0_0_6457865_22751\Main.java:1: illegal character: \35
#include<stdio.h>#include<algorithm>using namespace std;long long gcd(long long da,long long xiao){ long long temp; while(xiao!=0) { temp=da%xiao; da=xiao; xiao=temp; } return da;} int main(){ int iCase=0; int T; scanf("%d",&T); long long N,S1,V1,S2,V2; while(T--) { iCase++; scanf("%I64d%I64d%I64d%I64d%I64d",&N,&S1,&V1,&S2,&V2); long long tmp=S1*S2/gcd(S1,S2); long long res; long long tt=N/tmp; N=N%tmp; if(tt) { tt--; N+=tmp; } res=max((tt)*(tmp/S1)*V1,(tt)*(tmp/S2)*V2); long long res2=0; if(S2>S1) { long long t; t=S1;S1=S2;S2=t; t=V1;V1=V2;V2=t; } for(int i=0;i<=N/S1;i++) { if(res2<i*V1+(N-i*S1)/S2*V2)res2=i*V1+(N-i*S1)/S2*V2; } res+=res2; printf("Case #%d: %I64d\n",iCase,res); } return 0;}
^
0_0_6457865_22751\Main.java:1: illegal character: \35
#include<stdio.h>#include<algorithm>using namespace std;long long gcd(long long da,long long xiao){ long long temp; while(xiao!=0) { temp=da%xiao; da=xiao; xiao=temp; } return da;} int main(){ int iCase=0; int T; scanf("%d",&T); long long N,S1,V1,S2,V2; while(T--) { iCase++; scanf("%I64d%I64d%I64d%I64d%I64d",&N,&S1,&V1,&S2,&V2); long long tmp=S1*S2/gcd(S1,S2); long long res; long long tt=N/tmp; N=N%tmp; if(tt) { tt--; N+=tmp; } res=max((tt)*(tmp/S1)*V1,(tt)*(tmp/S2)*V2); long long res2=0; if(S2>S1) { long long t; t=S1;S1=S2;S2=t; t=V1;V1=V2;V2=t; } for(int i=0;i<=N/S1;i++) { if(res2<i*V1+(N-i*S1)/S2*V2)res2=i*V1+(N-i*S1)/S2*V2; } res+=res2; printf("Case #%d: %I64d\n",iCase,res); } return 0;}
^
0_0_6457865_22751\Main.java:1: class, interface, or enum expected
#include<stdio.h>#include<algorithm>using namespace std;long long gcd(long long da,long long xiao){ long long temp; while(xiao!=0) { temp=da%xiao; da=xiao; xiao=temp; } return da;} int main(){ int iCase=0; int T; scanf("%d",&T); long long N,S1,V1,S2,V2; while(T--) { iCase++; scanf("%I64d%I64d%I64d%I64d%I64d",&N,&S1,&V1,&S2,&V2); long long tmp=S1*S2/gcd(S1,S2); long long res; long long tt=N/tmp; N=N%tmp; if(tt) { tt--; N+=tmp; } res=max((tt)*(tmp/S1)*V1,(tt)*(tmp/S2)*V2); long long res2=0; if(S2>S1) { long long t; t=S1;S1=S2;S2=t; t=V1;V1=V2;V2=t; } for(int i=0;i<=N/S1;i++) { if(res2<i*V1+(N-i*S1)/S2*V2)res2=i*V1+(N-i*S1)/S2*V2; } res+=res2; printf("Case #%d: %I64d\n",iCase,res); } return 0;}
^
0_0_6457865_22751\Main.java:1: class, interface, or enum expected
#include<stdio.h>#include<algorithm>using namespace std;long long gcd(long long da,long long xiao){ long long temp; while(xiao!=0) { temp=da%xiao; da=xiao; xiao=temp; } return da;} int main(){ int iCase=0; int T; scanf("%d",&T); long long N,S1,V1,S2,V2; while(T--) { iCase++; scanf("%I64d%I64d%I64d%I64d%I64d",&N,&S1,&V1,&S2,&V2); long long tmp=S1*S2/gcd(S1,S2); long long res; long long tt=N/tmp; N=N%tmp; if(tt) { tt--; N+=tmp; } res=max((tt)*(tmp/S1)*V1,(tt)*(tmp/S2)*V2); long long res2=0; if(S2>S1) { long long t; t=S1;S1=S2;S2=t; t=V1;V1=V2;V2=t; } for(int i=0;i<=N/S1;i++) { if(res2<i*V1+(N-i*S1)/S2*V2)res2=i*V1+(N-i*S1)/S2*V2; } res+=res2; printf("Case #%d: %I64d\n",iCase,res); } return 0;}
^
0_0_6457865_22751\Main.java:1: class, interface, or enum expected
#include<stdio.h>#include<algorithm>using namespace std;long long gcd(long long da,long long xiao){ long long temp; while(xiao!=0) { temp=da%xiao; da=xiao; xiao=temp; } return da;} int main(){ int iCase=0; int T; scanf("%d",&T); long long N,S1,V1,S2,V2; while(T--) { iCase++; scanf("%I64d%I64d%I64d%I64d%I64d",&N,&S1,&V1,&S2,&V2); long long tmp=S1*S2/gcd(S1,S2); long long res; long long tt=N/tmp; N=N%tmp; if(tt) { tt--; N+=tmp; } res=max((tt)*(tmp/S1)*V1,(tt)*(tmp/S2)*V2); long long res2=0; if(S2>S1) { long long t; t=S1;S1=S2;S2=t; t=V1;V1=V2;V2=t; } for(int i=0;i<=N/S1;i++) { if(res2<i*V1+(N-i*S1)/S2*V2)res2=i*V1+(N-i*S1)/S2*V2; } res+=res2; printf("Case #%d: %I64d\n",iCase,res); } return 0;}
^
0_0_6457865_22751\Main.java:1: class, interface, or enum expected
#include<stdio.h>#include<algorithm>using namespace std;long long gcd(long long da,long long xiao){ long long temp; while(xiao!=0) { temp=da%xiao; da=xiao; xiao=temp; } return da;} int main(){ int iCase=0; int T; scanf("%d",&T); long long N,S1,V1,S2,V2; while(T--) { iCase++; scanf("%I64d%I64d%I64d%I64d%I64d",&N,&S1,&V1,&S2,&V2); long long tmp=S1*S2/gcd(S1,S2); long long res; long long tt=N/tmp; N=N%tmp; if(tt) { tt--; N+=tmp; } res=max((tt)*(tmp/S1)*V1,(tt)*(tmp/S2)*V2); long long res2=0; if(S2>S1) { long long t; t=S1;S1=S2;S2=t; t=V1;V1=V2;V2=t; } for(int i=0;i<=N/S1;i++) { if(res2<i*V1+(N-i*S1)/S2*V2)res2=i*V1+(N-i*S1)/S2*V2; } res+=res2; printf("Case #%d: %I64d\n",iCase,res); } return 0;}
^
0_0_6457865_22751\Main.java:1: class, interface, or enum expected
#include<stdio.h>#include<algorithm>using namespace std;long long gcd(long long da,long long xiao){ long long temp; while(xiao!=0) { temp=da%xiao; da=xiao; xiao=temp; } return da;} int main(){ int iCase=0; int T; scanf("%d",&T); long long N,S1,V1,S2,V2; while(T--) { iCase++; scanf("%I64d%I64d%I64d%I64d%I64d",&N,&S1,&V1,&S2,&V2); long long tmp=S1*S2/gcd(S1,S2); long long res; long long tt=N/tmp; N=N%tmp; if(tt) { tt--; N+=tmp; } res=max((tt)*(tmp/S1)*V1,(tt)*(tmp/S2)*V2); long long res2=0; if(S2>S1) { long long t; t=S1;S1=S2;S2=t; t=V1;V1=V2;V2=t; } for(int i=0;i<=N/S1;i++) { if(res2<i*V1+(N-i*S1)/S2*V2)res2=i*V1+(N-i*S1)/S2*V2; } res+=res2; printf("Case #%d: %I64d\n",iCase,res); } return 0;}
^
0_0_6457865_22751\Main.java:1: class, interface, or enum expected
#include<stdio.h>#include<algorithm>using namespace std;long long gcd(long long da,long long xiao){ long long temp; while(xiao!=0) { temp=da%xiao; da=xiao; xiao=temp; } return da;} int main(){ int iCase=0; int T; scanf("%d",&T); long long N,S1,V1,S2,V2; while(T--) { iCase++; scanf("%I64d%I64d%I64d%I64d%I64d",&N,&S1,&V1,&S2,&V2); long long tmp=S1*S2/gcd(S1,S2); long long res; long long tt=N/tmp; N=N%tmp; if(tt) { tt--; N+=tmp; } res=max((tt)*(tmp/S1)*V1,(tt)*(tmp/S2)*V2); long long res2=0; if(S2>S1) { long long t; t=S1;S1=S2;S2=t; t=V1;V1=V2;V2=t; } for(int i=0;i<=N/S1;i++) { if(res2<i*V1+(N-i*S1)/S2*V2)res2=i*V1+(N-i*S1)/S2*V2; } res+=res2; printf("Case #%d: %I64d\n",iCase,res); } return 0;}
^
0_0_6457865_22751\Main.java:1: class, interface, or enum expected
#include<stdio.h>#include<algorithm>using namespace std;long long gcd(long long da,long long xiao){ long long temp; while(xiao!=0) { temp=da%xiao; da=xiao; xiao=temp; } return da;} int main(){ int iCase=0; int T; scanf("%d",&T); long long N,S1,V1,S2,V2; while(T--) { iCase++; scanf("%I64d%I64d%I64d%I64d%I64d",&N,&S1,&V1,&S2,&V2); long long tmp=S1*S2/gcd(S1,S2); long long res; long long tt=N/tmp; N=N%tmp; if(tt) { tt--; N+=tmp; } res=max((tt)*(tmp/S1)*V1,(tt)*(tmp/S2)*V2); long long res2=0; if(S2>S1) {
|