submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s955243038
p00272
Java
import java.util.Scanner; public class Tiket{ Scanner sc = new Scanner(System.in); int nban,nsyu; public void handan(){ for(int i = 0; i<4; i++){ nsyu = sc.nextInt(); nban = sc.nextInt(); switch (nsyu){ case 1: System.out.println(nban*6000);break; case 2: System.out.println(nban*4000);break; case 3: System.out.println(nban*3000);break; case 4: System.out.println(nban*2000);break; } } } /** * @param args */ public static void main(String[] args) { Tiket t = new Tiket(); t.handan(); } }
Main.java:2: error: class Tiket is public, should be declared in a file named Tiket.java public class Tiket{ ^ 1 error
s151546716
p00272
Java
public class Main { public static void main(String[] args) { int k; int []intake = new int[4]; int inatai; int []atai={3,1,4,2}; int []maisu={10,4,1,5}; for(k=0;k<=4;k++){ switch(atai[k]){ case 1:inatai = 6000*maisu[k];break; case 2:inatai = 4000*maisu[k];break; case 3:inatai = 3000*maisu[k];break; case 4:inatai = 2000*maisu[k];break; inatai = intake[k]; System.out.println(atai[k]); System.out.println(maisu[k]); System.out.println(intake[k]); } } } }
Main.java:21: error: unreachable statement inatai = intake[k]; ^ 1 error
s714320471
p00272
Java
package ; import java.util.Scanner; public class Main { Scanner sc = new Scanner(System.in); public void nyuryoku(){ int t; int n; int x; int ha[] = new int[4];{ for(x=1;x>4;x++){ t = sc.nextInt(); n = sc.nextInt(); switch(t) { case 1: System.out.println(6000 * n);break; case 2: System.out.println(4000 * n);break; case 3: System.out.println(3000 * n);break; case 4: System.out.println(2000 * n);break; } } } } public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Main2 ha = new Main2(); ha.nyuryoku(); } }
Main.java:1: error: <identifier> expected package ; ^ 1 error
s370483012
p00272
Java
import java.util.Scanner; public class Main { Scanner sc = new Scanner(System.in); int kingaku; int[] goukei = new int[4]; int n; public void syurui(){ for(n=0;n<=3;n++){ int syurui = sc.nextInt(); int maisuu = sc.nextInt(); switch (syurui){ case 1: kingaku = 6000;break; case 2: kingaku = 4000;break; case 3: kingaku = 3000;break; case 4: kingaku = 2000;break; } goukei[n] = kingaku * maisuu; } } public void hyouji(){ for(n=0;n<=3;n++){ System.out.println(goukei[n]); } } public static void main(String[] args) { Main Main = new Main(); Main.syurui(); Main.hyouji(); }
Main.java:40: error: reached end of file while parsing } ^ 1 error
s435833534
p00272
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int k; int []intake = new int[4]; int inatai; int atai=sc.nextInt(); int maisu=sc.nextInt(); for(k=0;k<=4;k++){ switch(atai){ case 1:inatai = 6000*maisu;break; case 2:inatai = 4000*maisu;break; case 3:inatai = 3000*maisu;break; case 4:inatai = 2000*maisu;break; System.out.println(atai); System.out.println(maisu); System.out.println(inatai); } } } }
Main.java:23: error: unreachable statement System.out.println(atai); ^ 1 error
s976532063
p00272
Java
public class Main { Scanner sc = new Scanner(System.in); int t; int n; int tanka; int kingaku; public void kei(){ t = sc.nextInt(); n = sc.nextInt(); switch(t){ case 1:tanka = 6000; kingaku = tanka * n; break; case 2:tanka = 4000; kingaku = tanka * n; break; case 3:tanka = 3000; kingaku = tanka * n; break; case 4:tanka = 2000; kingaku = tanka * n; break; } } public void hyouji(){ System.out.println(kingaku); } /** * @param args */ public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Main go = new Main(); go.kei(); go.hyouji(); } }
Main.java:2: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:2: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s597885523
p00272
Java
import java.util.Scanner; public class Main2 { Scanner sc = new Scanner(System.in); int t,n,x; int sa[]=new int[4];{ for(x=0; x<=4 ;x++){ t = sc.nextInt(); n = sc.nextInt(); switch(t){ case 1: System.out.println(6000*n);break; case 2: System.out.println(4000*n);break; case 3: System.out.println(3000*n);break; case 4: System.out.println(2000*n);break; } } } /** * @param args */ public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Main2 sa = new Main2(); } }
Main.java:3: error: class Main2 is public, should be declared in a file named Main2.java public class Main2 { ^ 1 error
s195528739
p00272
Java
import java.util.Scanner; public class Main2 { Scanner sc = new Scanner(System.in); int t,n,x; int sa[]=new int[4];{ for(x=0; x<=4 ;x++){ t = sc.nextInt(); n = sc.nextInt(); switch(t){ case 1: System.out.println(6000*n);break; case 2: System.out.println(4000*n);break; case 3: System.out.println(3000*n);break; case 4: System.out.println(2000*n);break; } } } /** * @param args */ public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Main2 sa = new Main2(); } }
Main.java:3: error: class Main2 is public, should be declared in a file named Main2.java public class Main2 { ^ 1 error
s896388058
p00272
Java
import java.util.Scanner; public class Main2 { public Main2(){ Scanner sc = new Scanner(System.in); int t,n,x; int sa[]=new int[4];{ for(x=0; x<=4 ;x++){ t = sc.nextInt(); n = sc.nextInt(); switch(t){ case 1: System.out.println(6000*n);break; case 2: System.out.println(4000*n);break; case 3: System.out.println(3000*n);break; case 4: System.out.println(2000*n);break; } } } } /** * @param args */ public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Main2 sa = new Main2(); } }
Main.java:3: error: class Main2 is public, should be declared in a file named Main2.java public class Main2 { ^ 1 error
s515506896
p00272
Java
package pasokonkousien; public class Toi22103 { int[] seki = {3,1,4,2}; int[] maisu = {10,4,1,5}; int[] kingaku = new int [5]; int n; int oseki; public void keisan(){ for(n=0;n<4;n++){ oseki =seki[n]; switch(oseki){ case 1: kingaku[n] = 6000 * maisu[n]; break; case 2: kingaku[n] = 4000 * maisu[n]; break; case 3: kingaku[n] = 3000 * maisu[n]; break; default : kingaku[n] = 2000 * maisu[n]; break; } System.out.println(kingaku[n]); } } /** * @param args */ public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Toi22103 toi = new Toi22103(); toi.keisan(); } }
Main.java:3: error: class Toi22103 is public, should be declared in a file named Toi22103.java public class Toi22103 { ^ 1 error
s021114339
p00272
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int k,inatai,atai,maisu; for(k=0;k<=4;k++){ atai=sc.nextInt(); maisu=sc.nextInt(); switch(atai){ case 1:inatai = 6000*maisu;break; case 2:inatai = 4000*maisu;break; case 3:inatai = 3000*maisu;break; case 4:inatai = 2000*maisu;break; System.out.println(inatai); } } } }
Main.java:24: error: unreachable statement System.out.println(inatai); ^ 1 error
s099166932
p00272
Java
import java.util.Scanner; public class Main1 { /** * @param args */ public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner sc = new Scanner(System.in); int t=0; int n=0; int z; for(z=0;z<4;z++); switch(t){ case 1: System.out.println(n*6000);break; case 2: System.out.println(n*4000);break; case 3: System.out.println(n*3000);break; case 4: System.out.println(n*2000);break; } } }
Main.java:2: error: class Main1 is public, should be declared in a file named Main1.java public class Main1 { ^ 1 error
s991488611
p00272
Java
import java.util.Scanner; public class Main1 { /** * @param args */ public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner sc = new Scanner(System.in); int t=0; int n=0; int z; for(z=0;z<4;z++); t = sc.nextInt(); n = sc.nextInt(); switch(t){ case 1: System.out.println(n*6000);break; case 2: System.out.println(n*4000);break; case 3: System.out.println(n*3000);break; case 4: System.out.println(n*2000);break; } } }
Main.java:2: error: class Main1 is public, should be declared in a file named Main1.java public class Main1 { ^ 1 error
s375307433
p00272
Java
class Main{ public void run(){ Scanner sc = new Scanner(System.in); for( int i = 0; i < 4; i++){ int nType = sc.nextLine(); int nNum = sc.nextLine(); switch(nType){ case 1: System.out.println(6000*nNum); break; case 2: System.out.println(4000*nNum); break; case 3: System.out.println(3000*nNum); break; case 4: System.out.println(2000*nNum); break; } } } public static void main(String[] args){ new Main().run();} }
Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s274923232
p00272
Java
//2701 青木沙采 問2 import java.util.Scanner; public class Q0277{ int syurui[]={6000,4000,3000,2000}; int mun; int maisuu; int urikin; public void soleve(){ Scanner sc = new Scanner(System.in); for(int i=1;i<=4;i++){ mun = sc.nextInt(); maisuu = sc.nextInt(); System.out.println((syurui[mun-1]*maisuu)); } } public static void main(String[] args){ Q0277 obj = new Q0277(); obj.soleve(); } }
Main.java:3: error: class Q0277 is public, should be declared in a file named Q0277.java public class Q0277{ ^ 1 error
s753529174
p00272
Java
//2702 青山理恵 問2 import java.util.Scanner; public class Q0277{ int syurui[]={6000,4000,3000,2000}; int num; int maisuu; int urikin; public void solve(){ Scanner sc = new Scanner(System.in); for(int i=1;i<=4;i++){ num = sc.nextInt(); maisuu = sc.nextInt(); System.out.println((syurui[num-1])*maisuu); } } public static void main(String[] args){ Q0277 obj = new Q0277(); obj.solve(); } }
Main.java:4: error: class Q0277 is public, should be declared in a file named Q0277.java public class Q0277{ ^ 1 error
s950620899
p00272
Java
import java.util.Scanner; public class Main{ public void solve(){ Scanner sc = new Scanner(System.in); int syu,mai; for(int i=0;i<4,i++){ syu = sc.nextInt(); mai = sc.nextInt(); switch(syu){ case 1: System.out.println(6000*mai); break; case 2: System.out.println(4000*mai); break; case 3: System.out.println(3000*mai); break; case 4: System.out.println(2000*mai); break; } } } public static void main(String[]args){ Main obj = new Main(); obj.solve(); } }
Main.java:8: error: ';' expected for(int i=0;i<4,i++){ ^ 1 error
s687124110
p00272
Java
//2702 青山理恵 問2 import java.util.Scanner; public class Q0277{ int syurui[]={6000,4000,3000,2000}; int num; int maisuu; int urikin; public void solve(){ Scanner sc = new Scanner(System.in); for(int i=1;i<=4;i++){ num = sc.nextInt(); maisuu = sc.nextInt(); System.out.println((syurui[num-1])*maisuu); } } public static void main(String[] args){ Q0277 obj = new Q0277(); obj.solve(); } }
Main.java:4: error: class Q0277 is public, should be declared in a file named Q0277.java public class Q0277{ ^ 1 error
s822420056
p00272
Java
import java.util.Scanner; public class Main2{ int tiket[]={0,6000,4000,3000,2000}; int t,n,uriage; public void solve(){ Scanner sc=new Scanner(System.in); for(int i=1;i<5;i++){ t=sc.nextInt(); n=sc.nextInt(); uriage=tiket[t]*n; System.out.println(uriage); } } public static void main(String[] args){ Main2 obj=new Main2(); obj.solve(); } }
Main.java:2: error: class Main2 is public, should be declared in a file named Main2.java public class Main2{ ^ 1 error
s024620191
p00272
Java
import java.util.Scanner; public class Q0277{ public void solve(){ Scanner sc = new Scanner(System.in); int ninzu,k; int ban; for(int i=0;i<4;i++){ ban = sc.nextInt(); if(ban == 1){ k = 6000; }else if(ban == 2){ k = 4000; }else if(ban == 3){ k = 3000; }else{ k = 2000; } ninzu = sc.nextInt(); int uriage = k*ninzu; System.out.println(uriage); } } public static void main(String[] args){ Q0277 obj = new Q0277(); obj.solve(); } }
Main.java:2: error: class Q0277 is public, should be declared in a file named Q0277.java public class Q0277{ ^ 1 error
s765803338
p00272
Java
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 import java.util.Scanner; public class Main{ public void solve(){ Scanner sc = new Scanner(System.in); int ninzu,k; int ban; for(int i=0;i<4;i++){ ban = sc.nextInt(); if(ban == 1){ k = 6000; }else if(ban == 2){ k = 4000; }else if(ban == 3){ k = 3000; }else{ k = 2000; } ninzu = sc.nextInt(); int uriage = k*ninzu; System.out.println(uriage); } } public static void main(String[] args){ Main obj = new Main(); obj.solve(); } }
Main.java:2: error: class, interface, enum, or record expected 1 ^ 1 error
s563850611
p00272
Java
import java.util.Scanner; public class Q0277{ public void solve(){ Scanner sc = new Scanner(System.in); int ninzu,k; int ban; for(int i=0;i<4;i++){ ban = sc.nextInt(); if(ban == 1){ k = 6000; }else if(ban == 2){ k = 4000; }else if(ban == 3){ k = 3000; }else{ k = 2000; } ninzu = sc.nextInt(); int uriage = k * ninzu; System.out.println(uriage); } } public static void main(String[] args){ Q0277 obj = new Q0277(); obj.solve(); } }
Main.java:2: error: class Q0277 is public, should be declared in a file named Q0277.java public class Q0277{ ^ 1 error
s806953749
p00272
Java
import java.util.Scanner; &#160; class Main{ &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int tiket[]={0,6000,4000,3000,2000}; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int t,n,uriage; &#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;public void solve(){ &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Scanner sc=new Scanner(System.in); &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;for(int i=1;i<=4;i++){ &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;t=sc.nextInt(); &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;n=sc.nextInt(); &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;uriage=tiket[t]*n; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;System.out.println(uriage); &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;} &#160;&#160;&#160;&#160;} &#160;&#160;&#160;&#160;public static void main(String[]args){ &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Main obj=new Main(); &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;obj.solve(); &#160;&#160;&#160;&#160;} }
Main.java:2: error: class, interface, enum, or record expected &#160; ^ Main.java:2: error: illegal character: '#' &#160; ^ Main.java:4: error: illegal start of type &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int tiket[]={0,6000,4000,3000,2000}; ^ Main.java:4: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int tiket[]={0,6000,4000,3000,2000}; ^ Main.java:4: error: illegal start of type &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int tiket[]={0,6000,4000,3000,2000}; ^ Main.java:4: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int tiket[]={0,6000,4000,3000,2000}; ^ Main.java:4: error: illegal start of type &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int tiket[]={0,6000,4000,3000,2000}; ^ Main.java:4: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int tiket[]={0,6000,4000,3000,2000}; ^ Main.java:4: error: illegal start of type &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int tiket[]={0,6000,4000,3000,2000}; ^ Main.java:4: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int tiket[]={0,6000,4000,3000,2000}; ^ Main.java:4: error: illegal start of type &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int tiket[]={0,6000,4000,3000,2000}; ^ Main.java:4: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int tiket[]={0,6000,4000,3000,2000}; ^ Main.java:4: error: illegal start of type &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int tiket[]={0,6000,4000,3000,2000}; ^ Main.java:4: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int tiket[]={0,6000,4000,3000,2000}; ^ Main.java:4: error: illegal start of type &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int tiket[]={0,6000,4000,3000,2000}; ^ Main.java:4: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int tiket[]={0,6000,4000,3000,2000}; ^ Main.java:4: error: illegal start of type &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int tiket[]={0,6000,4000,3000,2000}; ^ Main.java:4: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int tiket[]={0,6000,4000,3000,2000}; ^ Main.java:5: error: illegal start of type &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int t,n,uriage; ^ Main.java:5: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int t,n,uriage; ^ Main.java:5: error: illegal start of type &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int t,n,uriage; ^ Main.java:5: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int t,n,uriage; ^ Main.java:5: error: illegal start of type &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int t,n,uriage; ^ Main.java:5: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int t,n,uriage; ^ Main.java:5: error: illegal start of type &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int t,n,uriage; ^ Main.java:5: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int t,n,uriage; ^ Main.java:5: error: illegal start of type &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int t,n,uriage; ^ Main.java:5: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int t,n,uriage; ^ Main.java:5: error: illegal start of type &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int t,n,uriage; ^ Main.java:5: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int t,n,uriage; ^ Main.java:5: error: illegal start of type &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int t,n,uriage; ^ Main.java:5: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int t,n,uriage; ^ Main.java:5: error: illegal start of type &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int t,n,uriage; ^ Main.java:5: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;int t,n,uriage; ^ Main.java:6: error: illegal start of type &#160;&#160;&#160;&#160;&#160; ^ Main.java:6: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160; ^ Main.java:6: error: illegal start of type &#160;&#160;&#160;&#160;&#160; ^ Main.java:6: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160; ^ Main.java:6: error: illegal start of type &#160;&#160;&#160;&#160;&#160; ^ Main.java:6: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160; ^ Main.java:6: error: illegal start of type &#160;&#160;&#160;&#160;&#160; ^ Main.java:6: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160; ^ Main.java:6: error: illegal start of type &#160;&#160;&#160;&#160;&#160; ^ Main.java:6: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160; ^ Main.java:7: error: illegal start of type &#160;&#160;&#160;&#160;public void solve(){ ^ Main.java:7: error: illegal character: '#' &#160;&#160;&#160;&#160;public void solve(){ ^ Main.java:7: error: illegal start of type &#160;&#160;&#160;&#160;public void solve(){ ^ Main.java:7: error: illegal character: '#' &#160;&#160;&#160;&#160;public void solve(){ ^ Main.java:7: error: illegal start of type &#160;&#160;&#160;&#160;public void solve(){ ^ Main.java:7: error: illegal character: '#' &#160;&#160;&#160;&#160;public void solve(){ ^ Main.java:7: error: illegal start of type &#160;&#160;&#160;&#160;public void solve(){ ^ Main.java:7: error: illegal character: '#' &#160;&#160;&#160;&#160;public void solve(){ ^ Main.java:8: error: illegal start of expression &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Scanner sc=new Scanner(System.in); ^ Main.java:8: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Scanner sc=new Scanner(System.in); ^ Main.java:8: error: illegal start of expression &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Scanner sc=new Scanner(System.in); ^ Main.java:8: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Scanner sc=new Scanner(System.in); ^ Main.java:8: error: illegal start of expression &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Scanner sc=new Scanner(System.in); ^ Main.java:8: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Scanner sc=new Scanner(System.in); ^ Main.java:8: error: illegal start of expression &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Scanner sc=new Scanner(System.in); ^ Main.java:8: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Scanner sc=new Scanner(System.in); ^ Main.java:8: error: illegal start of expression &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Scanner sc=new Scanner(System.in); ^ Main.java:8: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Scanner sc=new Scanner(System.in); ^ Main.java:8: error: illegal start of expression &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Scanner sc=new Scanner(System.in); ^ Main.java:8: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Scanner sc=new Scanner(System.in); ^ Main.java:8: error: illegal start of expression &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Scanner sc=new Scanner(System.in); ^ Main.java:8: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Scanner sc=new Scanner(System.in); ^ Main.java:8: error: illegal start of expression &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Scanner sc=new Scanner(System.in); ^ Main.java:8: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Scanner sc=new Scanner(System.in); ^ Main.java:9: error: illegal start of expression &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ^ Main.java:9: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ^ Main.java:9: error: illegal start of expression &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ^ Main.java:9: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ^ Main.java:9: error: illegal start of expression &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ^ Main.java:9: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ^ Main.java:9: error: illegal start of expression &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ^ Main.java:9: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ^ Main.java:9: error: illegal start of expression &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ^ Main.java:9: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ^ Main.java:9: error: illegal start of expression &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ^ Main.java:9: error: illegal character: '#' &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ^ Main.java:9: error: illegal start of expression &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#16
s282971191
p00272
Java
import java.util.Scanner; public class Main.278{ public void solve(){ Scanner sc=new Scanner(System.in); int hito,i,ban,uriage; for(int a=0; a<4;a++){ ban=sc.nextInt(); if(ban==1){ i=6000; }else if(ban ==2){ i=4000; }else if(ban ==3){ i=3000; }else{ i=2000; } hito=sc.nextInt(); uriage=i*hito; System.out.println(uriage); } } public static void main(String[] args){ Main obj = new Main.278(); obj.solve(); } }
Main.java:2: error: '{' expected public class Main.278{ ^ Main.java:25: error: '(' or '[' expected Main obj = new Main.278(); ^ 2 errors
s333121486
p00272
Java
import java.util.Scanner; public class Main.278{ public void solve(){ Scanner sc=new Scanner(System.in); int hito,i,ban,uriage; for(int a=0; a<4;a++){ ban=sc.nextInt(); if(ban==1){ i=6000; }else if(ban ==2){ i=4000; }else if(ban ==3){ i=3000; }else{ i=2000; } hito=sc.nextInt(); uriage=i*hito; System.out.println(uriage); } } public static void main(String[] args){ Main obj = new Main.278(); obj.solve(); } }
Main.java:2: error: '{' expected public class Main.278{ ^ Main.java:25: error: '(' or '[' expected Main obj = new Main.278(); ^ 2 errors
s291837139
p00272
Java
import java.util.Scanner; public class Main{ public void solve(){ Scanner sc = new Scanner(System.in); int syu,mai,a,uri; for(int t=0; t<4; t++){ syu = sc.nextInt; if(syu==1){ a=6000; }else if(syu==2){ a=4000; }else if(syu==3){ a=3000; }else if(syu==4){ a=2000; } mai = sc.nextInt(); uri = a * mai; System.out.println(uri); } } public static void main(String[] args){ Main obj = new Main(); obj.solve(); } }
Main.java:8: error: cannot find symbol syu = sc.nextInt; ^ symbol: variable nextInt location: variable sc of type Scanner 1 error
s549267831
p00272
Java
import java.util.Scanner; public class tiketto{ int kin[]= {6000,4000,3000,2000}; int t; int n; int go; public void solve(){ Scanner sc = new Scanner(System.in); for(int i=0;i<=3;i++){ t = sc.nextInt(); n = sc.nextInt(); t = t-1; go = n*kin[t]; System.out.println(go); } } public static void main(String[] args){ tiketto obj = new tiketto(); obj.solve(); } }
Main.java:2: error: class tiketto is public, should be declared in a file named tiketto.java public class tiketto{ ^ 1 error
s950824215
p00272
Java
//2706 石井夏鈴 問5 import java.util.Scanner; public class Main2{ int n,t,a; int ti[]={0,6000,4000,3000,2000}; public void solve(){ Scanner sc = new Scanner(System.in); for(int i=1;i<=4;i++){ t=sc.nextInt(); n=sc.nextInt(); a=ti[t]*n; System.out.println(a); } } public static void main(String[] args){ Main2 obj=new Main2(); obj.solve(); } }
Main.java:3: error: class Main2 is public, should be declared in a file named Main2.java public class Main2{ ^ 1 error
s457159685
p00272
Java
//2706 石井夏鈴 問5 import java.util.Scanner; public class Main2{ int n,t; int a=0; int ti[]={0,6000,4000,3000,2000}; public void solve(){ Scanner sc = new Scanner(System.in); for(int i=1;i<=4;i++){ t=sc.nextInt(); n=sc.nextInt(); a=ti[t]*n; System.out.println(a); } } public static void main(String[] args){ Main2 obj=new Main2(); obj.solve(); } }
Main.java:3: error: class Main2 is public, should be declared in a file named Main2.java public class Main2{ ^ 1 error
s753038839
p00272
C
#include<stdio.h> int main(){ int i,n,m,s,a,b,c; for(i=0;i<4;i++){ scanf("%d%d",&n,&m); switch (n){ case 1: s=m*6000; break; case 2: a=m*4000; break; case 3: b=m*3000; break; case 4: c=m*2000; break; } } printf("%d\n%d\n%d\n%d\n",s,a,b,c); return0; }
main.c: In function 'main': main.c:22:1: error: 'return0' undeclared (first use in this function) 22 | return0; | ^~~~~~~ main.c:22:1: note: each undeclared identifier is reported only once for each function it appears in
s051595898
p00272
C
#include<stdio.h> int main(){ int i,input,a[4],b; for(i=0;i<4;i++){ scanf("%d%d",&input,&); case (input){ case 1: a[i]=6000*b; case 2: a[i]=4000*b; case 3: a[i]=3000*b; case 4: a[i]=2000*b; } } for(i=0;i<4;i++){ printf("%d\n",a[i]); } return 0; }
main.c: In function 'main': main.c:5:30: error: expected expression before ')' token 5 | scanf("%d%d",&input,&); | ^ main.c:6:21: error: expected ':' or '...' before '{' token 6 | case (input){ | ^ main.c:7:17: error: case label not within a switch statement 7 | case 1: | ^~~~ main.c:9:17: error: case label not within a switch statement 9 | case 2: | ^~~~ main.c:11:17: error: case label not within a switch statement 11 | case 3: | ^~~~ main.c:13:17: error: case label not within a switch statement 13 | case 4: | ^~~~
s738611232
p00272
C
#include<stdio.h> int main(){ int i,input,a[4],b; for(i=0;i<4;i++){ scanf("%d%d",&input,&b); case (input){ case 1: a[i]=6000*b; case 2: a[i]=4000*b; case 3: a[i]=3000*b; case 4: a[i]=2000*b; } } for(i=0;i<4;i++){ printf("%d\n",a[i]); } return 0; }
main.c: In function 'main': main.c:6:21: error: expected ':' or '...' before '{' token 6 | case (input){ | ^ main.c:7:17: error: case label not within a switch statement 7 | case 1: | ^~~~ main.c:9:17: error: case label not within a switch statement 9 | case 2: | ^~~~ main.c:11:17: error: case label not within a switch statement 11 | case 3: | ^~~~ main.c:13:17: error: case label not within a switch statement 13 | case 4: | ^~~~
s570128076
p00272
C
#include<stdio.h> int main(){ int i,input,a[4],b; for(i=0;i<4;i++){ scanf("%d%d",&input,&b); case (input){ case 1: a[i]=6000*b; break; case 2: a[i]=4000*b; break; case 3: a[i]=3000*b; break; case 4: a[i]=2000*b; break; } } for(i=0;i<4;i++){ printf("%d\n",a[i]); } return 0; }
main.c: In function 'main': main.c:6:21: error: expected ':' or '...' before '{' token 6 | case (input){ | ^ main.c:7:17: error: case label not within a switch statement 7 | case 1: | ^~~~ main.c:10:17: error: case label not within a switch statement 10 | case 2: | ^~~~ main.c:13:17: error: case label not within a switch statement 13 | case 3: | ^~~~ main.c:16:17: error: case label not within a switch statement 16 | case 4: | ^~~~
s007448474
p00272
C
#include<stdio.h> int main(void) { int i,t,n,k; for(i=0;i>4;i++){ scanf("%d %d",&t,&n); if(t==1){ k=6000; } else{ k=(6-t)*1000; } k*=n; printf("%d\n",k) } return(0); }
main.c: In function 'main': main.c:13:21: error: expected ';' before '}' token 13 | printf("%d\n",k) | ^ | ; 14 | } | ~
s481974085
p00272
C
#include <stdio.h> int main(void) { int t[4]; int n[4]; int i; for(i=0;i<4;i++) scanf("%d %d",&t[i],&n[i]); for(i=0;i<4;i++){ switch(v[i])} case 1:t[i]=6000; break; case 2:t[i]=4000; break; case 3:t[i]=3000; break; case 4:t[i]=2000: break; } } for(i=0;i<4;i++) printf("%d\n",t[i]*n[i]); return 0; }
main.c: In function 'main': main.c:12:24: error: 'v' undeclared (first use in this function) 12 | switch(v[i])} | ^ main.c:12:24: note: each undeclared identifier is reported only once for each function it appears in main.c:12:29: error: expected expression before '}' token 12 | switch(v[i])} | ^ main.c:13:25: error: case label not within a switch statement 13 | case 1:t[i]=6000; break; | ^~~~ main.c:13:43: error: break statement not within loop or switch 13 | case 1:t[i]=6000; break; | ^~~~~ main.c:14:25: error: case label not within a switch statement 14 | case 2:t[i]=4000; break; | ^~~~ main.c:14:43: error: break statement not within loop or switch 14 | case 2:t[i]=4000; break; | ^~~~~ main.c:15:25: error: case label not within a switch statement 15 | case 3:t[i]=3000; break; | ^~~~ main.c:15:43: error: break statement not within loop or switch 15 | case 3:t[i]=3000; break; | ^~~~~ main.c:16:25: error: case label not within a switch statement 16 | case 4:t[i]=2000: break; | ^~~~ main.c:16:41: error: expected ';' before ':' token 16 | case 4:t[i]=2000: break; | ^ | ; main.c: At top level: main.c:18:9: error: expected identifier or '(' before '}' token 18 | } | ^ main.c:20:9: error: expected identifier or '(' before 'for' 20 | for(i=0;i<4;i++) | ^~~ main.c:20:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 20 | for(i=0;i<4;i++) | ^ main.c:20:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token 20 | for(i=0;i<4;i++) | ^~ main.c:23:9: error: expected identifier or '(' before 'return' 23 | return 0; | ^~~~~~ main.c:24:1: error: expected identifier or '(' before '}' token 24 | } | ^
s502717893
p00272
C
#include <stdio.h> int main(void) { int t[4]; int n[4]; int i; for(i=0;i<4;i++) scanf("%d %d",&t[i],&n[i]); for(i=0;i<4;i++){ switch(t[i])} case 1:t[i]=6000; break; case 2:t[i]=4000; break; case 3:t[i]=3000; break; case 4:t[i]=2000: break; } } for(i=0;i<4;i++) printf("%d\n",t[i]*n[i]); return 0; }
main.c: In function 'main': main.c:12:29: error: expected expression before '}' token 12 | switch(t[i])} | ^ main.c:13:25: error: case label not within a switch statement 13 | case 1:t[i]=6000; break; | ^~~~ main.c:13:43: error: break statement not within loop or switch 13 | case 1:t[i]=6000; break; | ^~~~~ main.c:14:25: error: case label not within a switch statement 14 | case 2:t[i]=4000; break; | ^~~~ main.c:14:43: error: break statement not within loop or switch 14 | case 2:t[i]=4000; break; | ^~~~~ main.c:15:25: error: case label not within a switch statement 15 | case 3:t[i]=3000; break; | ^~~~ main.c:15:43: error: break statement not within loop or switch 15 | case 3:t[i]=3000; break; | ^~~~~ main.c:16:25: error: case label not within a switch statement 16 | case 4:t[i]=2000: break; | ^~~~ main.c:16:41: error: expected ';' before ':' token 16 | case 4:t[i]=2000: break; | ^ | ; main.c: At top level: main.c:18:9: error: expected identifier or '(' before '}' token 18 | } | ^ main.c:20:9: error: expected identifier or '(' before 'for' 20 | for(i=0;i<4;i++) | ^~~ main.c:20:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 20 | for(i=0;i<4;i++) | ^ main.c:20:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token 20 | for(i=0;i<4;i++) | ^~ main.c:23:9: error: expected identifier or '(' before 'return' 23 | return 0; | ^~~~~~ main.c:24:1: error: expected identifier or '(' before '}' token 24 | } | ^
s398376430
p00272
C
#include <stdio.h> int main(void) { int t[4]; int n[4]; int i; for(i=0;i<4;i++) scanf("%d %d",&t[i],&n[i]); for(i=0;i<4;i++){ switch(t[i]){ case 1:t[i]=6000; break; case 2:t[i]=4000; break; case 3:t[i]=3000; break; case 4:t[i]=2000: break; } } for(i=0;i<4;i++) printf("%d\n",t[i]*n[i]); return 0; }
main.c: In function 'main': main.c:16:41: error: expected ';' before ':' token 16 | case 4:t[i]=2000: break; | ^ | ;
s838239552
p00272
C
#include<stdio.h> int main(void) { int t,n,x[4],i for(i=0;i<4;i++){ scanf("%d %d",&t,&n); if(t==1){ a[i]=n*6000; } if(t==2){ a[i]=n*4000; } if(t==3){ a[i]=n*3000; } if(t==4){ a[i]=n*2000; } for(j=0;j<4;j++){ printf("%d\n",x[j]); } return 0; }
main.c: In function 'main': main.c:5:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for' 5 | for(i=0;i<4;i++){ | ^~~ main.c:5:25: error: 'i' undeclared (first use in this function) 5 | for(i=0;i<4;i++){ | ^ main.c:5:25: note: each undeclared identifier is reported only once for each function it appears in main.c:5:32: error: expected ';' before ')' token 5 | for(i=0;i<4;i++){ | ^ | ; main.c:5:32: error: expected statement before ')' token main.c:8:25: error: 'a' undeclared (first use in this function) 8 | a[i]=n*6000; | ^ main.c:19:21: error: 'j' undeclared (first use in this function) 19 | for(j=0;j<4;j++){ | ^ main.c:23:1: error: expected declaration or statement at end of input 23 | } | ^
s652907708
p00272
C
#include<stdio.h> int main(void) { int t,n,x[4],i,j; for(i=0;i<4;i++){ scanf("%d %d",&t,&n); if(t==1){ a[i]=n*6000; } if(t==2){ a[i]=n*4000; } if(t==3){ a[i]=n*3000; } if(t==4){ a[i]=n*2000; } for(j=0;j<4;j++){ printf("%d\n",x[j]); } return 0; }
main.c: In function 'main': main.c:8:25: error: 'a' undeclared (first use in this function) 8 | a[i]=n*6000; | ^ main.c:8:25: note: each undeclared identifier is reported only once for each function it appears in main.c:23:1: error: expected declaration or statement at end of input 23 | } | ^
s376137618
p00272
C
#include<stdio.h> int main(void) { int t,n,x[4],i,j; for(i=0;i<4;i++){ scanf("%d %d",&t,&n); if(t==1){ x[i]=n*6000; } if(t==2){ x[i]=n*4000; } if(t==3){ x[i]=n*3000; } if(t==4){ x[i]=n*2000; } for(j=0;j<4;j++){ printf("%d\n",x[j]); } return 0; }
main.c: In function 'main': main.c:23:1: error: expected declaration or statement at end of input 23 | } | ^
s299718825
p00272
C
#include<stdio.h> int main(void) { int t[4],i,n[4],pokemon[4]; for(i=0;i<4;i++){ scanf("%d %d",&t[i],&n[i]); switch(t){ case 1: pokemon[1]=6000*n; case 2: pokemon[2]=4000*n; case 3: pokemon[3]=3000*n; case 4: pokemon[4]=2000*n; } for(i=1;i<=4;i++) printf("%d\n",pokemon[i]); return 0; }
main.c: In function 'main': main.c:7:16: error: switch quantity not an integer 7 | switch(t){ | ^ main.c:9:24: error: invalid operands to binary * (have 'int' and 'int *') 9 | pokemon[1]=6000*n; | ^ | | | int * main.c:11:24: error: invalid operands to binary * (have 'int' and 'int *') 11 | pokemon[2]=4000*n; | ^ | | | int * main.c:13:24: error: invalid operands to binary * (have 'int' and 'int *') 13 | pokemon[3]=3000*n; | ^ | | | int * main.c:15:24: error: invalid operands to binary * (have 'int' and 'int *') 15 | pokemon[4]=2000*n; | ^ | | | int * main.c:20:1: error: expected declaration or statement at end of input 20 | } | ^
s059685863
p00272
C
#include<stdio.h> int main(void) { int t[4],i,n[4],pokemon[4]; for(i=0;i<4;i++){ scanf("%d %d",&t[i],&n[i]); if(1==t) pokemon[i]=6000*n; else if(2==t) pokemon[i]=4000*n; else if(3==t) pokemon[i]=3000*n; else pokemon[i]=2000*n; } for(i=0;i<4;i++) printf("%d\n",pokemon[i]); return 0; }
main.c: In function 'main': main.c:7:13: warning: comparison between pointer and integer 7 | if(1==t) | ^~ main.c:8:24: error: invalid operands to binary * (have 'int' and 'int *') 8 | pokemon[i]=6000*n; | ^ | | | int * main.c:9:18: warning: comparison between pointer and integer 9 | else if(2==t) | ^~ main.c:10:24: error: invalid operands to binary * (have 'int' and 'int *') 10 | pokemon[i]=4000*n; | ^ | | | int * main.c:11:18: warning: comparison between pointer and integer 11 | else if(3==t) | ^~ main.c:12:24: error: invalid operands to binary * (have 'int' and 'int *') 12 | pokemon[i]=3000*n; | ^ | | | int * main.c:14:24: error: invalid operands to binary * (have 'int' and 'int *') 14 | pokemon[i]=2000*n; | ^ | | | int *
s117013202
p00272
C
#include<stdio.h> int main(void) { int t[4],i,n[4],pokemon[4]; for(i=0;i<4;i++){ scanf("%d %d",&t[i],&n[i]); if(1==t){ pokemon[i]=6000*n;} else if(2==t){ pokemon[i]=4000*n;} else if(3==t){ pokemon[i]=3000*n;} else{ pokemon[i]=2000*n;} } for(i=0;i<4;i++){ printf("%d\n",pokemon[i]);} return 0; }
main.c: In function 'main': main.c:7:13: warning: comparison between pointer and integer 7 | if(1==t){ | ^~ main.c:8:24: error: invalid operands to binary * (have 'int' and 'int *') 8 | pokemon[i]=6000*n;} | ^ | | | int * main.c:9:18: warning: comparison between pointer and integer 9 | else if(2==t){ | ^~ main.c:10:24: error: invalid operands to binary * (have 'int' and 'int *') 10 | pokemon[i]=4000*n;} | ^ | | | int * main.c:11:18: warning: comparison between pointer and integer 11 | else if(3==t){ | ^~ main.c:12:24: error: invalid operands to binary * (have 'int' and 'int *') 12 | pokemon[i]=3000*n;} | ^ | | | int * main.c:14:24: error: invalid operands to binary * (have 'int' and 'int *') 14 | pokemon[i]=2000*n;} | ^ | | | int *
s735679176
p00272
C
#include<stdio.h> int main(void) { int t[4],i,n[4],pokemon[4]; for(i=0;i<4;i++){ scanf("%d %d",&t[i],&n[i]); if(1==t){ pokemon[i]=6000*n;} else if(2==t){ pokemon[i]=4000*n;} else if(3==t){ pokemon[i]=3000*n;} else{ pokemon[i]=2000*n;} printf("%d\n",pokemon[i]); } return 0; }
main.c: In function 'main': main.c:7:13: warning: comparison between pointer and integer 7 | if(1==t){ | ^~ main.c:8:24: error: invalid operands to binary * (have 'int' and 'int *') 8 | pokemon[i]=6000*n;} | ^ | | | int * main.c:9:18: warning: comparison between pointer and integer 9 | else if(2==t){ | ^~ main.c:10:24: error: invalid operands to binary * (have 'int' and 'int *') 10 | pokemon[i]=4000*n;} | ^ | | | int * main.c:11:18: warning: comparison between pointer and integer 11 | else if(3==t){ | ^~ main.c:12:24: error: invalid operands to binary * (have 'int' and 'int *') 12 | pokemon[i]=3000*n;} | ^ | | | int * main.c:14:24: error: invalid operands to binary * (have 'int' and 'int *') 14 | pokemon[i]=2000*n;} | ^ | | | int *
s153846114
p00272
C
#include<stdio.h> int main(void) { int t,n,d[4],cnt=0; while(cnt!=3){ scanf("%d %d",&t,&n); if(t==1) d[cnt]=6000*n; else if(t==2) d[cnt]=4000*n; else if(t==3) d[cnt]=3000*n; else d[cnt]=2000*n; cnt++; } cnt=0 while(cnt!=3) printf("%d\n",d[cnt]); return 0; }
main.c: In function 'main': main.c:17:14: error: expected ';' before 'while' 17 | cnt=0 | ^ | ; 18 | while(cnt!=3) | ~~~~~
s609582245
p00272
C
#include<stdio.h> int main(void) { int t,n,i,Sseki,Aseki,Bseki,Cseki; for(i=1;i<5;i++){ scanf("%d%d",&t,&n); swich (t) { case 1: Sseki=6000*n; break; case 2: Aseki=3000*n; break; case 3: Bseki=3000*n; break; case 4: Cseki=2000*n; break; } if(t==1){ printf("%d\n",Sseki); } else if(t==2){ printf("%d\n",Aseki); } else if(t==3){ printf("%d\n",Bseki); } else{ printf("%d\n",Cseki); } } return 0; }
main.c: In function 'main': main.c:7:10: error: implicit declaration of function 'swich' [-Wimplicit-function-declaration] 7 | swich (t) | ^~~~~ main.c:7:19: error: expected ';' before '{' token 7 | swich (t) | ^ | ; 8 | { | ~
s607663792
p00272
C
#include<stdio.h> int main(void) { int t,n,i,Sseki,Aseki,Bseki,Cseki; for(i=1;i<5;i++){ scanf("%d%d",&t,&n); swich (t) { case 1: Sseki=6000*n; break; case 2: Aseki=3000*n; break; case 3: Bseki=3000*n; break; case 4: Cseki=2000*n; break; default break; } if(t==1){ printf("%d\n",Sseki); } else if(t==2){ printf("%d\n",Aseki); } else if(t==3){ printf("%d\n",Bseki); } else{ printf("%d\n",Cseki); } } return 0; }
main.c: In function 'main': main.c:7:10: error: implicit declaration of function 'swich' [-Wimplicit-function-declaration] 7 | swich (t) | ^~~~~ main.c:7:19: error: expected ';' before '{' token 7 | swich (t) | ^ | ; 8 | { | ~
s871273346
p00272
C
#include<stdio.h> int main(void) { int t,n,i,Sseki,Aseki,Bseki,Cseki; for(i=1;i<5;i++){ scanf("%d%d",&t,&n); switch (t) { case 1: Sseki=6000*n; break; case 2: Aseki=3000*n; break; case 3: Bseki=3000*n; break; case 4: Cseki=2000*n; break; default break; } if(t==1){ printf("%d\n",Sseki); } else if(t==2){ printf("%d\n",Aseki); } else if(t==3){ printf("%d\n",Bseki); } else{ printf("%d\n",Cseki); } } return 0; }
main.c: In function 'main': main.c:21:18: error: expected ':' before 'break' 21 | default | ^ | : 22 | break; | ~~~~~
s433284119
p00272
C
#include<stdio.h> int main(void) { int t,n,i,iti,ni,san,si; for(i=1;i<5;i++){ scanf("%d%d",&t,&n); switch (t) { case 1: iti=6000*n; break; case 2: ni=3000*n; break; case 3: san=3000*n; break; case 4: si=2000*n; break; default break; } if(t==1){ printf("%d\n",iti); } else if(t==2){ printf("%d\n",ni); } else if(t==3){ printf("%d\n",san); } else{ printf("%d\n",si); } } return 0; }
main.c: In function 'main': main.c:21:18: error: expected ':' before 'break' 21 | default | ^ | : 22 | break; | ~~~~~
s737718672
p00272
C
#include<stdio.h> int main(void) { int f,n,u,i; for (i = 0; i < 4; i++) { scanf_s("%d %d", &f, &n); switch (f) { case 1: u = 6000 * n; break; case 2: u = 4000 * n; break; case 3: u = 3000 * n; break; case 4: u = 2000 * n; break; } printf("%d\n", u); } return 0; }
main.c: In function 'main': main.c:5:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 5 | scanf_s("%d %d", &f, &n); | ^~~~~~~ | scanf
s341511288
p00272
C++
#include<stdio.h> int main() { int i; int n; int prices[] = {6000, 4000, 3000, 2000}; unsigned long long int sums[4]; for (i=0; i<4; i++) { int ind; unsigned long long int times; scanf("%d %llu", &ind, &times); sum[ind-1] = prices[ind-1] * times; } for (i=0; i<4; i++) { printf("%llu\n", sums[i]); } }
a.cc: In function 'int main()': a.cc:14:9: error: 'sum' was not declared in this scope; did you mean 'sums'? 14 | sum[ind-1] = prices[ind-1] * times; | ^~~ | sums
s196329263
p00272
C++
#include <cstdio> #include <iostream> #include <stdlib.h> #include <iomanip> #include <string> #include <sstream> #include <vector> #include <time.h> #include <algorithm> using namespace std; int main(){ int price = [6000,4000,3000,2000]; int a,b; for(int i = 1;i <= 4;i++){cin >> a >> b;cout << b * price[a-1] << endl;} }
a.cc: In function 'int main()': a.cc:13:18: error: expected identifier before numeric constant 13 | int price = [6000,4000,3000,2000]; | ^~~~ a.cc:13:22: error: expected ']' before ',' token 13 | int price = [6000,4000,3000,2000]; | ^ | ] a.cc: In lambda function: a.cc:13:22: error: expected '{' before ',' token a.cc: In function 'int main()': a.cc:13:17: error: invalid user-defined conversion from 'main()::<lambda()>' to 'int' [-fpermissive] 13 | int price = [6000,4000,3000,2000]; | ^~~~~ a.cc:13:17: note: candidate is: 'constexpr main()::<lambda()>::operator void (*)()() const' (near match) 13 | int price = [6000,4000,3000,2000]; | ^ a.cc:13:17: note: no known conversion from 'void (*)()' to 'int' a.cc:13:23: error: expected unqualified-id before numeric constant 13 | int price = [6000,4000,3000,2000]; | ^~~~ a.cc:15:62: error: invalid types 'int[int]' for array subscript 15 | for(int i = 1;i <= 4;i++){cin >> a >> b;cout << b * price[a-1] << endl;} | ^
s580489323
p00272
C++
#include <stdio.h> #include <algorithm> #include <stdlib.h> #include <string.h> #include <queue> #define rep(i,n) for(int i = 0; i < n; ++i) #define rrep(i,n) for(int i = 1; i <= n; ++i) using namespace std; typedef pair<int,int> P; const int INF = 1000000000; int main(){ int i,a,b; rep(i,4){ int scr; scanf("%d%d",&a,&b); switch(a){ case: 1 scr = 6000*b break; case: 2 scr = 4000*b break; case: 3 scr = 3000*b break; case: 4 scr = 2000*b break; } printf("%d\n",scr); } return 0; }
a.cc: In function 'int main()': a.cc:18:21: error: expected primary-expression before ':' token 18 | case: 1 | ^ a.cc:18:24: error: expected ';' before 'scr' 18 | case: 1 | ^ | ; 19 | scr = 6000*b | ~~~ a.cc:21:21: error: expected primary-expression before ':' token 21 | case: 2 | ^ a.cc:21:24: error: expected ';' before 'scr' 21 | case: 2 | ^ | ; 22 | scr = 4000*b | ~~~ a.cc:24:21: error: expected primary-expression before ':' token 24 | case: 3 | ^ a.cc:24:24: error: expected ';' before 'scr' 24 | case: 3 | ^ | ; 25 | scr = 3000*b | ~~~ a.cc:27:21: error: expected primary-expression before ':' token 27 | case: 4 | ^ a.cc:27:24: error: expected ';' before 'scr' 27 | case: 4 | ^ | ; 28 | scr = 2000*b | ~~~
s852216588
p00272
C++
#include<iostream> using namespace std; int main(){ int tick, n; int temp[5] = {0, 6000, 4000, 3000, 2000} for(int i=0;i<4;i++){ cin >> tick >> n; cout << temp[tick] * n; } }
a.cc: In function 'int main()': a.cc:7:5: error: expected ',' or ';' before 'for' 7 | for(int i=0;i<4;i++){ | ^~~ a.cc:7:17: error: 'i' was not declared in this scope 7 | for(int i=0;i<4;i++){ | ^
s590792660
p00272
C++
#include <iostream> using namespace std; int main(){ int t,n; for(int i = 0; i < 4;i++){ int result = 0 cin >> t >> n; switch (t) { case 1: result = 6000*n; break; case 2: result = 4000*n; break; case 3: result = 3000*n; break; case 4: result = 2000*n; break; } cout << result << endle; } }
a.cc: In function 'int main()': a.cc:8:5: error: expected ',' or ';' before 'cin' 8 | cin >> t >> n; | ^~~ a.cc:23:23: error: 'endle' was not declared in this scope 23 | cout << result << endle; | ^~~~~
s693077708
p00272
C++
#include<stdio.h> int main(void) { int t[4],i,n[4],pokemon[4]; for(i=0;i<4;i++){ scanf("%d %d",&t[i],&n[i]); if(1==t) pokemon[i]=6000*n; else if(2==t) pokemon[i]=4000*n; else if(3==t) pokemon[i]=3000*n; else pokemon[i]=2000*n; } for(i=0;i<4;i++) printf("%d\n",pokemon[i]); return 0; }
a.cc: In function 'int main()': a.cc:7:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if(1==t) | ~^~~ a.cc:8:24: error: invalid operands of types 'int' and 'int [4]' to binary 'operator*' 8 | pokemon[i]=6000*n; | ~~~~^~ | | | | int int [4] a.cc:9:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | else if(2==t) | ~^~~ a.cc:10:24: error: invalid operands of types 'int' and 'int [4]' to binary 'operator*' 10 | pokemon[i]=4000*n; | ~~~~^~ | | | | int int [4] a.cc:11:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | else if(3==t) | ~^~~ a.cc:12:24: error: invalid operands of types 'int' and 'int [4]' to binary 'operator*' 12 | pokemon[i]=3000*n; | ~~~~^~ | | | | int int [4] a.cc:14:24: error: invalid operands of types 'int' and 'int [4]' to binary 'operator*' 14 | pokemon[i]=2000*n; | ~~~~^~ | | | | int int [4]
s713834222
p00272
C++
#include<stdio.h> int main(void) { int n,j,i; int tike[4]; int en[4]; int temp; scnaf(n); for(i=0;i<n;i++) scnaf("%d %d",&en[i],&tike[i]); for(i=0;i<n+1;i++){ for(j=0;i+1;j<n++){ if(tike[i]>tike[j]){ temp=tike[i]; tike[i]=tike[j]; en[i]=en[j]; en[j]=temp; } } } for(i=0;i<4;i++){ printf("%d\n",tike[i]); } return 0; }
a.cc: In function 'int main()': a.cc:8:1: error: 'scnaf' was not declared in this scope; did you mean 'scanf'? 8 | scnaf(n); | ^~~~~ | scanf
s298996575
p00272
C++
#include <iostream> using namespace std; int main () { int t; int n; int result; for (int i = 0; i < 4; i++) { cin >> t >> n; switch (t) { case 1: result = 6000 * n; return; case 2: result = 4000 * n; return; case 3: result = 3000 * n; return; case 4: result = 2000 * n; return; } cout << result << endl(); } return 0; }
a.cc: In function 'int main()': a.cc:13:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 13 | return; | ^~~~~~ a.cc:16:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 16 | return; | ^~~~~~ a.cc:19:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 19 | return; | ^~~~~~ a.cc:22:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 22 | return; | ^~~~~~ a.cc:24:27: error: no matching function for call to 'endl()' 24 | cout << result << endl(); | ~~~~^~ In file included from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/ostream:744:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::endl(basic_ostream<_CharT, _Traits>&)' 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ /usr/include/c++/14/ostream:744:5: note: candidate expects 1 argument, 0 provided
s703837388
p00272
C++
#include <iostream> using namespace std; int main () { int t; int n; int result; for (int i = 0; i < 4; i++) { cin >> t >> n; switch (t) { case 1: result = 6000 * n; return; case 2: result = 4000 * n; return; case 3: result = 3000 * n; return; case 4: result = 2000 * n; return; } cout << result << endl; } return 0; }
a.cc: In function 'int main()': a.cc:13:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 13 | return; | ^~~~~~ a.cc:16:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 16 | return; | ^~~~~~ a.cc:19:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 19 | return; | ^~~~~~ a.cc:22:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 22 | return; | ^~~~~~
s766398114
p00272
C++
#include <iostream> using namespace std; void main () { int t; int n; int result; for (int i = 0; i < 4; i++) { cin >> t >> n; switch (t) { case 1: result = 6000 * n; return; case 2: result = 4000 * n; return; case 3: result = 3000 * n; return; case 4: result = 2000 * n; return; } cout << result << endl; } return 0; }
a.cc:4:1: error: '::main' must return 'int' 4 | void main () { | ^~~~ a.cc: In function 'int main()': a.cc:13:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 13 | return; | ^~~~~~ a.cc:16:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 16 | return; | ^~~~~~ a.cc:19:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 19 | return; | ^~~~~~ a.cc:22:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 22 | return; | ^~~~~~
s162695668
p00272
C++
#include <iostream> using namespace std; int main () { int t; int n; int result; for (int i = 0; i < 4; i++) { cin >> t >> n; switch (t) { case 1: result = 6000 * n; return; case 2: result = 4000 * n; return; case 3: result = 3000 * n; return; case 4: result = 2000 * n; return; } cout << result << endl; } return 0; }
a.cc: In function 'int main()': a.cc:13:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 13 | return; | ^~~~~~ a.cc:16:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 16 | return; | ^~~~~~ a.cc:19:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 19 | return; | ^~~~~~ a.cc:22:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 22 | return; | ^~~~~~
s908307020
p00272
C++
#define scanf_s scanf #include<stdio.h> int main(void) { int a, b, i, mo[4] = { 6000,4000,3000,2000 }; for (i = 0; i < 4; i++) { scanf_s("%d %d", &a, &b); printf("%d\n", mo[a - 1] * b); } return(0);
a.cc: In function 'int main()': a.cc:10:19: error: expected '}' at end of input 10 | return(0); | ^ a.cc:4:16: note: to match this '{' 4 | int main(void) { | ^
s053719403
p00272
C++
int main(){ int t,n; int aka[5]={0}; int i; for(i=0;i<4;i++){ cin>>t>>n; if(t==1){ aka[i]=6000*n; } else if(t==2){ aka[i]=4000*n; } else if(t==3){ aka[i]=3000*n; } else{ aka[i]=2000*n; } } for(i=0;i<4;i++){ cout<<aka[i]<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:6:17: error: 'cin' was not declared in this scope 6 | cin>>t>>n; | ^~~ a.cc:21:17: error: 'cout' was not declared in this scope 21 | cout<<aka[i]<<endl; | ^~~~ a.cc:21:31: error: 'endl' was not declared in this scope 21 | cout<<aka[i]<<endl; | ^~~~
s087512359
p00272
C++
#include <iostream> using namespace std; int main(){ int a,b; for (int A=0;A<4;A++){ cin>>a>>b; if (a==1)cout<<6000*b<<endl; if (a==2)cout<<4000*b<<endl; if (a==3)cout<<1000*b<<endl; else cout<<2000*b<<endl; } return 0: }
a.cc: In function 'int main()': a.cc:12:17: error: expected ';' before ':' token 12 | return 0: | ^ | ; a.cc:12:17: error: expected primary-expression before ':' token
s182436175
p00272
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c for(int i =0;i<4;i++){ cin >> a>>b; if (a == 1) { c = 6000*b; cout << c<<endl; } else if (a == 2) { c = 4000*b; cout <<c<<endl; } else if (a ==3) { c = 3000*b; cout <<c<<endl; } else if (a ==4) { c = 2000*b; cout <<c<<endl; } }
a.cc: In function 'int main()': a.cc:6:4: error: expected initializer before 'for' 6 | for(int i =0;i<4;i++){ | ^~~ a.cc:6:17: error: 'i' was not declared in this scope 6 | for(int i =0;i<4;i++){ | ^ a.cc:21:2: error: expected '}' at end of input 21 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s987790311
p00272
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; for(int i =0;i<4;i++){ cin >> a>>b; if (a == 1) { c = 6000*b; cout << c<<endl; } else if (a == 2) { c = 4000*b; cout <<c<<endl; } else if (a ==3) { c = 3000*b; cout <<c<<endl; } else if (a ==4) { c = 2000*b; cout <<c<<endl; } }
a.cc: In function 'int main()': a.cc:21:2: error: expected '}' at end of input 21 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s106400624
p00272
C++
#include <iosream> using namespace std; int A[4],B[4],C[4]; int main(){ cin >>A[0]>>B[0]>>A[1]>>B[1]>>A[2]>>B[2]>>A[3]>>B[3]; for(int i = 0; i < 4; i++){ if(A[i]==1){ C[i]=6000*B[i]; }else if(A[i]==2){ C[i]=4000*B[i]; }else if(A[i]==3){ C[i]=3000*B[i]; }else{ C[i]=2000*B[i]; } cout << C[0] <<C[1] <<C[2] <<C[3]; }
a.cc:1:10: fatal error: iosream: No such file or directory 1 | #include <iosream> | ^~~~~~~~~ compilation terminated.
s149567149
p00272
C++
#include <iosream> using namespace std; int A[4],B[4],C[4]; int main(){ cin >>A[0]>>B[0]>>A[1]>>B[1]>>A[2]>>B[2]>>A[3]>>B[3]; for(int i = 0; i < 4; i++){ if(A[i]==1){ C[i]=6000*B[i]; }else if(A[i]==2){ C[i]=4000*B[i]; }else if(A[i]==3){ C[i]=3000*B[i]; }else{ C[i]=2000*B[i]; } } cout <<C[0]<<endl<<C[1]<<endl<<C[2]<<endl<<C[3]<endl; }
a.cc:1:10: fatal error: iosream: No such file or directory 1 | #include <iosream> | ^~~~~~~~~ compilation terminated.
s156668776
p00272
C++
#include <iostream> using namespace std; int A[4],B[4],C[4]; int main(){ cin >>A[0]>>B[0]>>A[1]>>B[1]>>A[2]>>B[2]>>A[3]>>B[3]; for(int i = 0; i < 4; i++){ if(A[i]==1){ C[i]=6000*B[i]; }else if(A[i]==2){ C[i]=4000*B[i]; }else if(A[i]==3){ C[i]=3000*B[i]; }else{ C[i]=2000*B[i]; } } cout <<C[0]<<endl<<C[1]<<endl<<C[2]<<endl<<C[3]<endl; }
a.cc: In function 'int main()': a.cc:19:50: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 19 | cout <<C[0]<<endl<<C[1]<<endl<<C[2]<<endl<<C[3]<endl; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ In file included from /usr/include/c++/14/string:48, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:19:51: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 19 | cout <<C[0]<<endl<<C[1]<<endl<<C[2]<<endl<<C[3]<endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:19:51: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 19 | cout <<C[0]<<endl<<C[1]<<endl<<C[2]<<endl<<C[3]<endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:19:51: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 19 | cout <<C[0]<<endl<<C[1]<<endl<<C[2]<<endl<<C[3]<endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:19:51: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 19 | cout <<C[0]<<endl<<C[1]<<endl<<C[2]<<endl<<C[3]<endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:19:51: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 19 | cout <<C[0]<<endl<<C[1]<<endl<<C[2]<<endl<<C[3]<endl; | ^~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:19:51: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 19 | cout <<C[0]<<endl<<C[1]<<endl<<C[2]<<endl<<C[3]<endl; | ^~~~ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:19:51: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 19 | cout <<C[0]<<endl<<C[1]<<endl<<C[2]<<endl<<C[3]<endl; | ^~~~ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:19:51: note: couldn't deduce template parameter '_CharT' 19 | cout <<C[0]<<endl<<C[1]<<endl<<C[2]<<endl<<C[3]<endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:19:51: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 19 | cout <<C[0]<<endl<<C[1]<<endl<<C[2]<<endl<<C[3]<endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed: a.cc:19:51: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 19 | cout <<C[0]<<endl<<C[1]<<endl<<C[2]<<endl<<C[3]<endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3901 | operator<(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed: a.cc:19:51: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 19 | cout <<C[0]<<endl<<C[1]<<endl<<C[2]<<endl<<C[3]<endl; | ^~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2600 | operator<(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed: a.cc:19:51: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 19 | cout <<C[0]<<endl<<C[1]<<endl<<C[2]<<endl<<C[3]<endl; | ^~~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ^~~~~~~~ /usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_code&' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)' 507 | operator<(const error_condition& __lhs, | ^~~~~~~~ /usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_condition&' 507 | operator<(const error_condition& __lhs, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
s040562822
p00272
C++
#include<stdio.h> int main(void){ int i,t,n; for(i=0;i<4;i++){ scanf("%d %d",&t,&n); switch(t){ case 1: printf("%d\n",n*6000); break; case 2: printf("%d\n",n*4000); break; case 3: printf("%d\n",n*3000); break; case 4: printf("%d\n",n*2000); break; } return 0; }
a.cc: In function 'int main()': a.cc:22:2: error: expected '}' at end of input 22 | } | ^ a.cc:3:15: note: to match this '{' 3 | int main(void){ | ^
s796484597
p00272
C++
using System; class Program { static void Main() { for (int i = 0; i < 4; i++) { int[] tickets = { 6000, 4000, 3000, 2000 }; var strs = Console.ReadLine().Split(' '); Console.WriteLine(tickets[int.Parse(strs[0]) - 1] * int.Parse(strs[1])); } } }
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:13:2: error: expected ';' after class definition 13 | } | ^ | ; a.cc: In static member function 'static void Program::Main()': a.cc:8:16: error: structured binding declaration cannot have type 'int' 8 | int[] tickets = { 6000, 4000, 3000, 2000 }; | ^~ a.cc:8:16: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto' a.cc:8:16: error: empty structured binding declaration a.cc:8:19: error: expected initializer before 'tickets' 8 | int[] tickets = { 6000, 4000, 3000, 2000 }; | ^~~~~~~ a.cc:9:13: error: 'var' was not declared in this scope 9 | var strs = Console.ReadLine().Split(' '); | ^~~ a.cc:10:13: error: 'Console' was not declared in this scope 10 | Console.WriteLine(tickets[int.Parse(strs[0]) - 1] * int.Parse(strs[1])); | ^~~~~~~ a.cc:10:31: error: 'tickets' was not declared in this scope 10 | Console.WriteLine(tickets[int.Parse(strs[0]) - 1] * int.Parse(strs[1])); | ^~~~~~~ a.cc:10:39: error: expected primary-expression before 'int' 10 | Console.WriteLine(tickets[int.Parse(strs[0]) - 1] * int.Parse(strs[1])); | ^~~ a.cc:10:39: error: expected ']' before 'int'
s143578743
p00272
C++
using System; class Program { static void Main() { for (int i = 0; i < 4; i++) { int[] tickets = new int[]{ 6000, 4000, 3000, 2000 }; string[] strs = Console.ReadLine().Split(' '); Console.WriteLine(tickets[int.Parse(strs[0]) - 1] * int.Parse(strs[1])); } } }
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:13:2: error: expected ';' after class definition 13 | } | ^ | ; a.cc: In static member function 'static void Program::Main()': a.cc:8:16: error: structured binding declaration cannot have type 'int' 8 | int[] tickets = new int[]{ 6000, 4000, 3000, 2000 }; | ^~ a.cc:8:16: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto' a.cc:8:16: error: empty structured binding declaration a.cc:8:19: error: expected initializer before 'tickets' 8 | int[] tickets = new int[]{ 6000, 4000, 3000, 2000 }; | ^~~~~~~ a.cc:9:13: error: 'string' was not declared in this scope 9 | string[] strs = Console.ReadLine().Split(' '); | ^~~~~~ a.cc:9:20: error: expected primary-expression before ']' token 9 | string[] strs = Console.ReadLine().Split(' '); | ^ a.cc:10:13: error: 'Console' was not declared in this scope 10 | Console.WriteLine(tickets[int.Parse(strs[0]) - 1] * int.Parse(strs[1])); | ^~~~~~~ a.cc:10:31: error: 'tickets' was not declared in this scope 10 | Console.WriteLine(tickets[int.Parse(strs[0]) - 1] * int.Parse(strs[1])); | ^~~~~~~ a.cc:10:39: error: expected primary-expression before 'int' 10 | Console.WriteLine(tickets[int.Parse(strs[0]) - 1] * int.Parse(strs[1])); | ^~~ a.cc:10:39: error: expected ']' before 'int'
s134414598
p00272
C++
using System; class Program { static void Main() { for (int i = 0; i < 4; i++) { int[] tickets = { 6000, 4000, 3000, 2000 }; string[] strs = Console.ReadLine().Split(' '); Console.WriteLine(tickets[Int32.Parse(strs[0]) - 1] * Int32.Parse(strs[1])); } } }
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:13:2: error: expected ';' after class definition 13 | } | ^ | ; a.cc: In static member function 'static void Program::Main()': a.cc:8:16: error: structured binding declaration cannot have type 'int' 8 | int[] tickets = { 6000, 4000, 3000, 2000 }; | ^~ a.cc:8:16: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto' a.cc:8:16: error: empty structured binding declaration a.cc:8:19: error: expected initializer before 'tickets' 8 | int[] tickets = { 6000, 4000, 3000, 2000 }; | ^~~~~~~ a.cc:9:13: error: 'string' was not declared in this scope 9 | string[] strs = Console.ReadLine().Split(' '); | ^~~~~~ a.cc:9:20: error: expected primary-expression before ']' token 9 | string[] strs = Console.ReadLine().Split(' '); | ^ a.cc:10:13: error: 'Console' was not declared in this scope 10 | Console.WriteLine(tickets[Int32.Parse(strs[0]) - 1] * Int32.Parse(strs[1])); | ^~~~~~~ a.cc:10:31: error: 'tickets' was not declared in this scope 10 | Console.WriteLine(tickets[Int32.Parse(strs[0]) - 1] * Int32.Parse(strs[1])); | ^~~~~~~ a.cc:10:39: error: 'Int32' was not declared in this scope 10 | Console.WriteLine(tickets[Int32.Parse(strs[0]) - 1] * Int32.Parse(strs[1])); | ^~~~~ a.cc:10:51: error: 'strs' was not declared in this scope 10 | Console.WriteLine(tickets[Int32.Parse(strs[0]) - 1] * Int32.Parse(strs[1])); | ^~~~
s860309093
p00272
C++
#include<iostream> using namespace std; int main(){ int a,b; for(int i=0;i<4;i++) cin>>a>>b; if(a==1) cout<<b*6000<<endl; if(a==2) cout<<b*4000<<endl;; if(a==3) cout<<b*3000<<endl; if(a==4) cout<<b*2000<<endl; } return 0; }
a.cc:16:9: error: expected unqualified-id before 'return' 16 | return 0; | ^~~~~~ a.cc:17:1: error: expected declaration before '}' token 17 | } | ^
s606797725
p00272
C++
1 1 2 0 3 1 4 1
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 1 1 | ^
s766443554
p00273
Java
class Main{ public void solve(){ Scanner sc = new Scanner(System.in); int nissu, nyuumai, pumai; double nyuuryou, puryou, total; nissu = sc.nextInt(); int num = 1; while(num <= nissu){ nyuuryou = sc.nextInt(); puryou = sc.nextInt(); nyuumai = sc.nextInt(); pumai = sc.nextInt(); if(nyuumai >= 5 && pumai >= 2){ nyuuryou = nyuuryou - nyuuryou * 0.2; puryou = puryou - puryou * 0.2; } total = (nyuuryou * nyuumai) + (puryou * pumai); System.out.println((int)total); num += 1; } } public static void main(String[] args){ Main obj = new Main(); obj.solve(); } }
Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s121506411
p00273
Java
import java.util.Scanner; public class Main{ public void solve(); Scanner sc = new Scanner(System.in); int n,x,y,b,p,kin; n = sc.nextInt(); x = sc.nextInt(); y = sc.nextInt(); b = sc.nextInt(); p = sc.nextInt(); kin = (x*b)+(y*p); if(x=>5 && y=>2){ System.out.println(kin*0.8); }else{ System.out.println(kin); } public static void main(String[]args){ Main obj = new Main(); obj.solve(); } }
Main.java:6: error: <identifier> expected n = sc.nextInt(); ^ Main.java:7: error: <identifier> expected x = sc.nextInt(); ^ Main.java:8: error: <identifier> expected y = sc.nextInt(); ^ Main.java:9: error: <identifier> expected b = sc.nextInt(); ^ Main.java:10: error: <identifier> expected p = sc.nextInt(); ^ Main.java:11: error: <identifier> expected kin = (x*b)+(y*p); ^ Main.java:12: error: illegal start of type if(x=>5 && y=>2){ ^ Main.java:12: error: <identifier> expected if(x=>5 && y=>2){ ^ Main.java:12: error: illegal start of expression if(x=>5 && y=>2){ ^ Main.java:12: error: illegal start of expression if(x=>5 && y=>2){ ^ Main.java:12: error: ';' expected if(x=>5 && y=>2){ ^ Main.java:14: error: illegal start of type }else{ ^ 12 errors
s818351715
p00273
Java
//2701 青木沙采 問2 import java.util.Scanner; public class Q0277{ int syurui[]={6000,4000,3000,2000}; int mun; int maisuu; int urikin; public void soleve(){ Scanner sc = new Scanner(System.in); for(int i=1;i<=4;i++){ mun = sc.nextInt(); maisuu = sc.nextInt(); System.out.println((syurui[mun-1]*maisuu)); } } public static void main(String[] args){ Q0277 obj = new Q0277(); obj.soleve(); } }
Main.java:3: error: class Q0277 is public, should be declared in a file named Q0277.java public class Q0277{ ^ 1 error
s819244529
p00273
Java
//2701 青木沙采 問2 import java.util.Scanner; public class Q0277{ public void soleve(){ Scanner sc = new Scanner(System.in); int ninzu,k; int ban; for(int i=1;i<=4;i++){ ban = sc.nextInt(); if(ban == 1){ k = 6000; }else if(ban == 2){ k = 4000; }else if(ban == 3){ k = 3000; }else{ k = 2000; } ninzu = sc.nextInt(); int uriage = k * ninzu; System.out.println(uriage); } } public static void main(String[] args){ Q0277 obj = new Q0277(); obj.soleve(); } }
Main.java:3: error: class Q0277 is public, should be declared in a file named Q0277.java public class Q0277{ ^ 1 error
s616203828
p00273
Java
//2701 青木沙采 問2 import java.util.Scanner; public class Q0277{ public void soleve(){ Scanner sc = new Scanner(System.in); int ninzu,k; int ban; for(int i=1;i<=4;i++){ ban = sc.nextInt(); if(ban == 1){ k = 6000; }else if(ban == 2){ k = 4000; }else if(ban == 3){ k = 3000; }else{ k = 2000; } ninzu = sc.nextInt(); int uriage = k * ninzu; System.out.println(uriage); } } public static void main(String[] args){ Q0277 obj = new Q0277(); obj.soleve(); } }
Main.java:3: error: class Q0277 is public, should be declared in a file named Q0277.java public class Q0277{ ^ 1 error
s160150744
p00273
Java
//2701 青木沙采 問2 import java.util.Scanner; public class Q0277{ public void soleve(){ Scanner sc = new Scanner(System.in); int ninzu,k; int ban; for(int i=1;i<=4;i++){ ban = sc.nextInt(); if(ban == 1){ k = 6000; }else if(ban == 2){ k = 4000; }else if(ban == 3){ k = 3000; }else{ k = 2000; } ninzu = sc.nextInt(); int uriage = k * ninzu; System.out.println(uriage); } } public static void main(String[] args){ Q0277 obj = new Q0277(); obj.soleve(); } }
Main.java:3: error: class Q0277 is public, should be declared in a file named Q0277.java public class Q0277{ ^ 1 error
s014271685
p00273
Java
import java.util.Scanner; public class huro{ public void solve(){ int n,x,y,b,p,go,wgo; Scanner sc = new Scanner(System.in); n = sc.nextInt(); for(int i=1;i<=n;i++){ x = sc.nextInt(); y = sc.nextInt(); b = sc.nextInt(); p = sc.nextInt(); go = x*b+y*p; if(b<=5){ b=5; } if(p<=2){ p=2; } wgo =(x*b+y*p)/10*8; if(go<wgo){ System.out.println(go); }else{ System.out.println(wgo); } } } public static void main(String[] args){ huro obj = new huro(); obj.solve(); } }
Main.java:2: error: class huro is public, should be declared in a file named huro.java public class huro{ ^ 1 error
s319901944
p00273
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(true){ int m = sc.nextInt(); if(m==0) break; int cnt = 0; boolean flag = false; for(int i=0;i<n;i++){ int p = sc.nextInt(); if(p>0) cnt++; if(p>1) flag = true; } if(!flag) System.out.println("NA"); else System.out.println(cnt+1); } } }
Main.java:13: error: cannot find symbol for(int i=0;i<n;i++){ ^ symbol: variable n location: class Main 1 error
s402940616
p00273
Java
import java.util.Scanner; public class Main{ public static void main(String[]args){ Scanner sc =new Scanner(System.in); int Ni =sc.nextInt(); int[] A = new int[Ni]; for(int n = 1;n <= Ni; n++){ int Nr = sc.nextInt(); int Pr = sc.nextInt(); int Nm = sc.nextInt(); int Pm = sc.nextInt(); } if(Nm >= 5 && Pm >= 2){ A[n] = (Nr * Nm / 10 * 8) + (Pr * Pm / 10 * 8); }else{ A[n] = Nr * Nm + Pr * Pm; } for(int i = 1; i <= Ni; i++){ System.out.println(A[i]); } } }
Main.java:13: error: cannot find symbol if(Nm >= 5 && Pm >= 2){ ^ symbol: variable Nm location: class Main Main.java:13: error: cannot find symbol if(Nm >= 5 && Pm >= 2){ ^ symbol: variable Pm location: class Main Main.java:14: error: cannot find symbol A[n] = (Nr * Nm / 10 * 8) + (Pr * Pm / 10 * 8); ^ symbol: variable n location: class Main Main.java:14: error: cannot find symbol A[n] = (Nr * Nm / 10 * 8) + (Pr * Pm / 10 * 8); ^ symbol: variable Nr location: class Main Main.java:14: error: cannot find symbol A[n] = (Nr * Nm / 10 * 8) + (Pr * Pm / 10 * 8); ^ symbol: variable Nm location: class Main Main.java:14: error: cannot find symbol A[n] = (Nr * Nm / 10 * 8) + (Pr * Pm / 10 * 8); ^ symbol: variable Pr location: class Main Main.java:14: error: cannot find symbol A[n] = (Nr * Nm / 10 * 8) + (Pr * Pm / 10 * 8); ^ symbol: variable Pm location: class Main Main.java:16: error: cannot find symbol A[n] = Nr * Nm + Pr * Pm; ^ symbol: variable n location: class Main Main.java:16: error: cannot find symbol A[n] = Nr * Nm + Pr * Pm; ^ symbol: variable Nr location: class Main Main.java:16: error: cannot find symbol A[n] = Nr * Nm + Pr * Pm; ^ symbol: variable Nm location: class Main Main.java:16: error: cannot find symbol A[n] = Nr * Nm + Pr * Pm; ^ symbol: variable Pr location: class Main Main.java:16: error: cannot find symbol A[n] = Nr * Nm + Pr * Pm; ^ symbol: variable Pm location: class Main 12 errors
s852153416
p00273
Java
import java.util.Scanner; public class mainA{ int a,kin,wari; public void solve(){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); for(int i=0;i<n;i++){ int x=sc.nextInt(); int y=sc.nextInt(); int b=sc.nextInt(); int p=sc.nextInt(); kin=x*b+y*p; if(b>=5 && p>=2){ wari=kin*4/5; }else if(b<5){ b=5; }else if(p<2){ p=2; } wari=(x*b+y*p)*4/5; if(kin>wari){ kin=wari; } System.out.println(kin); } } public static void main(String[] args){ mainA obj = new mainA(); obj.solve(); } }
Main.java:3: error: class mainA is public, should be declared in a file named mainA.java public class mainA{ ^ 1 error
s697986960
p00273
Java
import java.util.Scanner; public class Main2_278{ public void solve(){ Scanner sc=new Scanner(System.in); int niti,nyuryo,puluryo,nyumai,pulumai,nyukei,pulukei,goukei; niti=sc.nextInt(); for(int i=0; i<niti; i++){ nyuryo=sc.nextInt(); puluryo=sc.nextInt(); nyumai=sc.nextInt(); pulumai=sc.nextInt(); nyukei=nyuryo*nyumai; pulukei=puluryo*pulumai; goukei=nyukei+pulukei; if(nyumai>=5 && pulumai>=2 ){ goukei=goukei*4/5; System.out.println(goukei); }else { System.out.println(goukei); } } } public static void main(String[] args){ Main2_278 obj = new Main2_278(); obj.solve(); } }
Main.java:2: error: class Main2_278 is public, should be declared in a file named Main2_278.java public class Main2_278{ ^ 1 error
s168097360
p00273
Java
public void solve(){ Scanner sc =new Scanner(System.in); int stok,syurui; int a = 0; int hairetsu[]; syurui = sc.nextInt(); hairetsu = new int[syurui]; for(int b = 0; b<syurui; b++){ stok =sc.nextInt(); hairetsu[a] = stok; a+=1; } for(int p=0;p<syurui;p++){ if(hairetsu[p] == 0){ System.out.print("N#A"); }else if(syurui ==1){ System.out.print(2); }else{ System.out.print(syurui+1); } } } public static void main(String[] args){ Main1 obj = new Main1(); obj.solve(); } }
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. public void solve(){ ^ (use --enable-preview to enable unnamed classes) Main.java:29: error: class, interface, enum, or record expected } ^ 2 errors
s900590818
p00273
Java
import java.util.*; public class mon2{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); int x = 0; int y = 0; int z = 0; for(int i=1;i<=4;i++){ x = scan.nextInt(); z = scan.nextInt(); if(x == 1){ y = z * 6000; }else if(x == 2){ y = z * 4000; }else if(x == 3){ y = z * 3000; }else if(x == 4){ y = z * 2000; } System.out.println(y); } } }
Main.java:3: error: class mon2 is public, should be declared in a file named mon2.java public class mon2{ ^ 1 error
s201899983
p00273
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); int N = 0; int x = 0; int y = 0; int b = 0; int p = 0; int f; int a = 99999; N = scan.nextInt(); for(int i=0;i<N;i++){ x = scan.nextInt(); y = scan.nextInt(); b = scan.nextInt(); p = scan.nextInt(); f = x * b + y * p; //通常の値段 if(b >= 5 && p >= 2){ a = f * 0.8; }else if(b >= 5 && p < 2){ //b>5を判定 a = f * 0.8; }else if(b < 5 && p >= 2){ //p>2を判定 a = f * 0.8; }else{ System.out.println(f); } if(f > a){ System.out.println(a); }else{ System.out.println(f); } } } }
Main.java:21: error: incompatible types: possible lossy conversion from double to int a = f * 0.8; ^ Main.java:24: error: incompatible types: possible lossy conversion from double to int a = f * 0.8; ^ Main.java:27: error: incompatible types: possible lossy conversion from double to int a = f * 0.8; ^ 3 errors
s088852676
p00273
C
#include<stdio.h> int main(void) { int N,x,y,p,i,w,r,n,g; scanf("%d",&N); for(i=1;i<=N;i++){ scanf("%d %d %d %d",&x,&y,&b,&p); W=x*b; r=y*p; n=w+r; if(x==5&&y==2){ g=n*0.2; n=n-g; } } printf("%d\n",n); return 0 }
main.c: In function 'main': main.c:7:44: error: 'b' undeclared (first use in this function) 7 | scanf("%d %d %d %d",&x,&y,&b,&p); | ^ main.c:7:44: note: each undeclared identifier is reported only once for each function it appears in main.c:8:17: error: 'W' undeclared (first use in this function) 8 | W=x*b; | ^ main.c:17:17: error: expected ';' before '}' token 17 | return 0 | ^ | ; 18 | } | ~
s808759493
p00273
C
#include<stdio.h> int main(void) { int N,x,y,p,i,w,r,n,g; scanf("%d",&N); for(i=1;i<=N;i++){ scanf("%d %d %d %d",&x,&y,&b,&p); W=x*b; r=y*p; n=w+r; if((x<=5)&&(y<=2)){ g=n*0.2; n=n-g; } } printf("%d\n",n); return 0 }
main.c: In function 'main': main.c:7:44: error: 'b' undeclared (first use in this function) 7 | scanf("%d %d %d %d",&x,&y,&b,&p); | ^ main.c:7:44: note: each undeclared identifier is reported only once for each function it appears in main.c:8:17: error: 'W' undeclared (first use in this function) 8 | W=x*b; | ^ main.c:17:17: error: expected ';' before '}' token 17 | return 0 | ^ | ; 18 | } | ~
s123848471
p00273
C
#include<stdio.h> int f(int fa,int fb,int fc,int fd){ if(fc>=5&&fd>=2)return (fa*fc+fb*fd)*; return fa*fc+fb*fd; } int main(void){ int i,j,k,N,x,y,b,p,ans,ANS; scanf("%d",&N); for(i=0;i<N;i++){ scanf("%d %d %d %d",&x,&y,&b,&p); ANS=f(x,y,b,p); for(j=b;j<=b+5;j++){ for(k=p;k<=p+2;k++){ ans=f(x,y,j,k); if(ans<ANS)ANS=ans; } } printf("%d\n",ANS); } return 0; }
main.c: In function 'f': main.c:3:42: error: expected expression before ';' token 3 | if(fc>=5&&fd>=2)return (fa*fc+fb*fd)*; | ^
s617955771
p00273
C
#include<stdio.h> int main(void) { int n,i,j,x,y,b,p,a[365]; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d %d %d %d",&x,&y,&b,&p); if(5>=b&&2<=p){ a[i]=(x*b+y*p)*0.8; } else{ a[i]=(x*b+y*p); } } for(j=0;j<n;j++){ printf("%d\n",a[j]; } return 0; }
main.c: In function 'main': main.c:16:59: error: expected ')' before ';' token 16 | printf("%d\n",a[j]; | ~ ^ | ) main.c:16:60: error: expected ';' before '}' token 16 | printf("%d\n",a[j]; | ^ | ; 17 | } | ~
s851761069
p00273
C
#include<stdio.h> int main(void){ int n,x,y,b,p,i; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d %d %d %d",&x,&y,&b,&p); if(b>=5 && p>=2)printf("%d\n",0.8*(b*x+p*y)) else printf("%d\n",x+y); } return 0; }
main.c: In function 'main': main.c:7:55: error: expected ';' before 'else' 7 | if(b>=5 && p>=2)printf("%d\n",0.8*(b*x+p*y)) | ^ | ; 8 | else printf("%d\n",x+y); | ~~~~
s432097418
p00273
C
#include<stdio.h> int main(void){ int n,x,y,b,p,i; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d %d %d %d",&x,&y,&b,&p); if(b>=5 && p>=2)printf("%d\n",0.8*(b*x+p*y)) else printf("%d\n",b*x+p*y); } return 0; }
main.c: In function 'main': main.c:7:55: error: expected ';' before 'else' 7 | if(b>=5 && p>=2)printf("%d\n",0.8*(b*x+p*y)) | ^ | ; 8 | else printf("%d\n",b*x+p*y); | ~~~~
s338904629
p00273
C
#include<stdio.h> int main(void) { int f,g,n,x,y,b,p,i; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d %d %d %d",&x,&y,&b,&p); if(x>=5&&y>=2){ f=(x*b+y*p)*0.8; g=x*b+y*p; if(f<g) printf("%d\n",g); else printf("%d\n",f); } else{ g=x*b+y*p; printf("%d\n",g);} return 0; }
main.c: In function 'main': main.c:20:1: error: expected declaration or statement at end of input 20 | } | ^
s433879436
p00273
C
#include<stdio.h> int main(){ int i,j,N,x,y,b,p,an,ano,ans[365]; scanf("%d",&N); for(i=0;i<N;i++){ scanf("%d %d %d %d",&x,&y,&b,&p); b = x*b ; p = y*p; an = p+b; if(x>=5 && y>= 2){ an = an * 0.8; } else if(x>=5){ ano = (x*b + y*2) * 0.8; if(ano < an) an = ano; } else if(y>=2){ ano = (x*5 + y*p) * 0.8; if(ano < an) an = ano; } else{ ano = (x*5 + y*2) * 0.8; if(ano < an) an = ano; ans[i] = an; } for(i=0;i<N;i++){ printf("%d\n",ans[i]); } return 0; }
main.c: In function 'main': main.c:39:1: error: expected declaration or statement at end of input 39 | } | ^
s216186767
p00273
C
#include<stdio.h> int main(void) { int f,g,n,x,y,b,p,i; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d %d %d %d",&x,&y,&b,&p); if(x>=5&&y>=2){ f=(x*b+y*p)*0.8; g=x*b+y*p; if(f<g) printf("%d\n",g); else printf("%d\n",f); } else{ g=x*b+y*p; printf("%d\n",g);} return 0; }
main.c: In function 'main': main.c:20:1: error: expected declaration or statement at end of input 20 | } | ^
s085337845
p00273
C
#include<stdio.h> int main(void){ int n,x,y,b,p,i; scanf("%d",&n); for(i=0:i<n;i++){ scanf("%d %d %d %d",x,y,b,p); if(x>=5 && y>=2)printf("%d\n",0.8*b*x+0.8*p*y); else printf("%d\n",x*b+y*p); } return 0; }
main.c: In function 'main': main.c:5:13: error: expected ';' before ':' token 5 | for(i=0:i<n;i++){ | ^ | ; main.c:5:21: error: expected ';' before ')' token 5 | for(i=0:i<n;i++){ | ^ | ;
s278944891
p00273
C
#include<stdio.h> int main(void){ int n,x,y,b,p,i; scanf("%d",&n); for(i=0:i<n;i++){ scanf("%d %d %d %d",&x,&y,&b,&p); if(x>=5 && y>=2)printf("%d\n",0.8*b*x+0.8*p*y); else printf("%d\n",x*b+y*p); } return 0; }
main.c: In function 'main': main.c:5:13: error: expected ';' before ':' token 5 | for(i=0:i<n;i++){ | ^ | ; main.c:5:21: error: expected ';' before ')' token 5 | for(i=0:i<n;i++){ | ^ | ;