submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s514453368
p00031
Java
import java.util.*; public class Vol0_31{ private static final Scanner scan = new Scanner(System.in); public static void main(String[] args){ StringBuffer sb = new StringBuffer(); while(scan.hasNext()){ int w = scan.nextInt(); int i = 1; while(i <= 512){ if((w & i) == i){ sb.append(i).append('...
Main.java:3: error: class Vol0_31 is public, should be declared in a file named Vol0_31.java public class Vol0_31{ ^ 1 error
s525939573
p00031
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); while(s.hasNext){ boolean flag[] = new boolean[10]; int in = s.nextInt(); int a = 1024; for(int i=9 ; i>=0 ; i--){ a /= 2; if(in>=a){ in -= a; ...
Main.java:7: error: cannot find symbol while(s.hasNext){ ^ symbol: variable hasNext location: variable s of type Scanner 1 error
s336277861
p00031
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); while(s.hasNext){ boolean flag[] = new boolean[10]; int in = s.nextInt(); int a = 1024; int n = 0; for(int i=9 ; i>=0 ; i--){ a /= 2; if(in>=a){ ...
Main.java:7: error: cannot find symbol while(s.hasNext){ ^ symbol: variable hasNext location: variable s of type Scanner 1 error
s297544833
p00031
Java
public class weight { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub int input=32; System.out.println("Input:"+input); System.out.print("Output:"); System.out.println(weight(input)); } public static String weight(int num){ //num=蛟、縲〔=菫よ焚 int number...
Main.java:1: error: class weight is public, should be declared in a file named weight.java public class weight { ^ 1 error
s976933186
p00031
Java
public static void main(String[] args) { // TODO Auto-generated method stub int input=32; System.out.println("Input:"+input); System.out.print("Output:"); System.out.println(weight(input)); } public static String weight(int num){ //num=蛟、縲〔=菫よ焚 int number=num; String sub=""; //途中経過 String result="";...
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args) { ^ (use --enable-preview to enable unnamed classes) 1 error
s652563757
p00031
Java
public class Main { /** * @param args */ public static void main(String[] args) throws Exception{ // TODO Auto-generated method stub //int input=32; BufferedReader input_a = new BufferedReader (new InputStreamReader (System.in)); int input = Integer.parseInt(input_a.readLine()); //System.out.printl...
Main.java:9: error: cannot find symbol BufferedReader input_a = ^ symbol: class BufferedReader location: class Main Main.java:10: error: cannot find symbol new BufferedReader (new InputStreamReader (System.in)); ^ symbol: class BufferedReader location: class Main Main.java:10: error: cannot ...
s262623104
p00031
C
#include <stdio.h> int main(void) { int a[10],int c[10]={0},i,inp,same; a[0]=1,a[1]=2,a[2]=4,a[3]=8,a[4]=16,a[5]=32,a[6]=64,a[7]=128,a[8]=256,a[9]=512; for(;scanf("%d",&inp)!=EOF;) { c[10]={0}; same=inp; if(inp%2!=0) { c[0]=1; inp-=1; } ...
main.c: In function 'main': main.c:4:15: error: expected identifier or '(' before 'int' 4 | int a[10],int c[10]={0},i,inp,same; | ^~~ main.c:4:28: error: expected expression before ',' token 4 | int a[10],int c[10]={0},i,inp,same; | ^ main.c:4:29: err...
s259428997
p00031
C
#include<stdio.h> int main() { int i, n; while (scanf("%d", &n) != EOF) { for (i = 0; i < 10; i ++) { if (n & 1 << i) i{ printf("%d", 1 << i); break; } for (i = 0; i < 10; i ++) { if (n & 1 << i) printf(" %d", 1 << i); } printf("\n"); } return 0; }
main.c: In function 'main': main.c:6:24: error: expected ';' before '{' token 6 | if (n & 1 << i) i{ | ^ | ; main.c:15:1: error: expected declaration or statement at end of input 15 | } | ^
s162854776
p00031
C
#include<stdio.h> int main() { int i, n; while (scanf("%d", &n) != EOF) { for (i = 0; i < 10; i ++) { if (n & 1 << i) { printf("%d", 1 << i); break; } for (i = 0; i < 10; i ++) { if (n & 1 << i) printf(" %d", 1 << i); } printf("\n"); } return 0; }
main.c: In function 'main': main.c:15:1: error: expected declaration or statement at end of input 15 | } | ^
s826386787
p00031
C
#include<stdio.h> int main() { int i, j, n; while (scanf("%d", &n) != EOF) { for (h = 0; j < 10; j ++) { if (n & 1 << j) { printf("%d", 1 << i); break; } } for (i = j; i < 10; i ++) { if (n & 1 << i) printf(" %d", 1 << i); } printf("\n"); } return 0; }
main.c: In function 'main': main.c:5:10: error: 'h' undeclared (first use in this function) 5 | for (h = 0; j < 10; j ++) { | ^ main.c:5:10: note: each undeclared identifier is reported only once for each function it appears in
s986395030
p00031
C
#include <stdio.h> int main() { int i, n; while (scanf("%d", &n) != EOF){ for (i = 1; i <= 512; i *= 2){ if (n % (i * 2) != 0){ printf("%d", i); n -= i; if (n != 0){ printf(" "); } } if (n == 0){ puts(""); break; } } } return 0;
main.c: In function 'main': main.c:20:1: error: expected declaration or statement at end of input 20 | return 0; | ^~~~~~
s350601219
p00031
C
#include <cstdio> #include <algorithm> using namespace std; int main() { int n, c; int a[10] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 516}; int b[10]; while (scanf("%d", &n) != EOF){ c = 0; for (int i = 9; 0 <= i; i--){ if (n >= a[i]){ n -= a[i]; b[c] = a[i]; c++; } } reverse(b, b + c); ...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s281413298
p00031
C
#niclude<stdio.h> int main(){ int a,x[12],k,i; while(scanf("%d",&a)!=EOF){ k=0; if(a>=512){ x[k++]=512; a-=512; if(a>=256){ x[k++]=256; a-=256; } if(a>=128){ x[k++]=128; a-=128; } if(a>=64){ x[k++]=64; a-=64; } if(a>=32){ x[k++]=32; a-=32; } if(a>=16){ x[k++]=16; a-=16; } if(a>=8){ x[k++]=8; a-=8; } if(a>=4){ x[k++]=4;...
main.c:1:2: error: invalid preprocessing directive #niclude; did you mean #include? 1 | #niclude<stdio.h> | ^~~~~~~ | include main.c: In function 'main': main.c:4:7: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 4 | while(scanf("%d",&a)!=EOF){ | ^~~~...
s128031979
p00031
C
main(f,n,x){ for(;~scanf("%d",&n);puts("")){ for(f=0,x=1;n;x+=x){ if(n&x){ if(f)putchar(' '); printf("%d",x),n-=x,f=1; } } } return 0; }
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(f,n,x){ | ^~~~ main.c: In function 'main': main.c:1:1: error: type of 'f' defaults to 'int' [-Wimplicit-int] main.c:1:1: error: type of 'n' defaults to 'int' [-Wimplicit-int] main.c:1:1: error: type of 'x' defaults to 'int' [-Wimplicit...
s490391022
p00031
C
#include<stdio.h> int main(){ while(scanf("%d", &d) != EOF){ int d, first; first = 1; while(d){ if(!first)putchar(' '); first = 0; printf("%d", d & -d); d -= d & -d; } puts(""); } return 0; }
main.c: In function 'main': main.c:4:22: error: 'd' undeclared (first use in this function) 4 | while(scanf("%d", &d) != EOF){ | ^ main.c:4:22: note: each undeclared identifier is reported only once for each function it appears in
s763200809
p00031
C
#include<stdio.h> int n;int i;bool f;int main(){while(scanf("%d",&n)!=EOF){f=true;for(i=0;i<10;i++)if(n>>i&1){if(f){printf("%d",1<<i);f=false;}else printf(" %d",1<<i);}printf("\n");}}
main.c:2:13: error: unknown type name 'bool' 2 | int n;int i;bool f;int main(){while(scanf("%d",&n)!=EOF){f=true;for(i=0;i<10;i++)if(n>>i&1){if(f){printf("%d",1<<i);f=false;}else printf(" %d",1<<i);}printf("\n");}} | ^~~~ main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probabl...
s070894674
p00031
C
#include<stdio.h> int main(void) { int x; int i; int cnt = 0; int a[10]={1,2,4,8,16,32,64,128,256,512},check[10]={0}; while(scanf("%d",&x)!=EOF){ for(i = 9;i >= 0; i--){ if(x >= a[i] && check[i] == 0){ check[i] = 1; x -= a[i]; if(c...
main.c: In function 'main': main.c:27:1: error: expected declaration or statement at end of input 27 | } | ^
s430648828
p00031
C
#include <cstdio> #include <cmath> #include <vector> #define pb push_back using namespace std; int main(void) { int n,b; vector<int> vec; while(scanf("%d",&n)!=EOF) { b=n; vec.clear(); while(b>0) { vec.pb(b%2); b/=2; } int size = vec.size(); for(int i=0;i<size;i++) { if(vec[i]) { pri...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s836472865
p00031
C
#include <stdio.h> #include <math.h> int main(void) { int w; int i; while (scanf("%d", &w) != EOF){ int weight[10] = {0}; int n; for (i = 9; i >= 0; i--){ if (w - (int)pow(2, i) >= 0){ weight[i] = 1; w -= (int)pow(2, i); } } for (i = 0; i < 10; i++){ if (!i && weight[i]){ printf(...
main.c: In function 'main': main.c:21:60: error: expected ')' before ';' token 21 | printf("%d", (int)pow(2, i); | ~ ^ | ) main.c:26:26: error: expected ';' ...
s025633818
p00031
C
#include <stdio.h> #include <math.h> int main(void) { int w; int i; while (scanf("%d", &w) != EOF){ int weight[10] = {0}; int n; for (i = 9; i >= 0; i--){ if (w - (int)pow(2, i) >= 0){ weight[i] = 1; w -= (int)pow(2, i); } } for (i = 0; i < 10; i++){ if (!i && weight[i]){ printf(...
main.c: In function 'main': main.c:21:60: error: expected ')' before ';' token 21 | printf("%d", (int)pow(2, i); | ~ ^ | ) main.c:24:26: error: expected ';' ...
s803005796
p00031
C++
5 7 127
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 5 | ^
s677042096
p00031
C++
while gets g=$_.chomp.to_i h=Array.new loop do break if(g==0) h<<g%2 g=g/2 end ans=[] h.each_with_index{|item,num| ans<<item*2**num if(item*2**num!=0)} puts ans.join(" ") end
a.cc:1:1: error: expected unqualified-id before 'while' 1 | while gets | ^~~~~ a.cc:11:5: error: 'puts' does not name a type 11 | puts ans.join(" ") | ^~~~
s535117724
p00031
C++
while gets g=$_.chomp.to_i h=Array.new loop do break if(g==0) h<<g%2 g=g/2 end ans=[] h.each_with_index{|item,num| ans<<item*2**num if(item*2**num!=0)} puts ans.join(" ") end
a.cc:1:1: error: expected unqualified-id before 'while' 1 | while gets | ^~~~~ a.cc:11:5: error: 'puts' does not name a type 11 | puts ans.join(" ") | ^~~~
s360453915
p00031
C++
while g=gets g=g.chomp.to_i h=Array.new loop do break if(g==0) h<<g%2 g=g/2 end ans=[] h.each_with_index{|item,num| ans<<item*2**num if(item*2**num!=0)} puts ans.join(" ") end
a.cc:1:1: error: expected unqualified-id before 'while' 1 | while g=gets | ^~~~~ a.cc:11:5: error: 'puts' does not name a type 11 | puts ans.join(" ") | ^~~~
s623392664
p00031
C++
#include <iostream> #include <vector> #include <queue> #include <stack> #include <map> #include <set> #include <cmath> #include <cstdio> #include <cstring> #include <cstdlib> #include <functional> #include <string> #include <algorithm> #include <climits> #include <utility> #define PRINT(STR) cout << STR << endl; #defi...
a.cc: In function 'int main()': a.cc:69:32: error: expected ';' before 'endl' 69 | cout << ans[ans.size() - 1]endl; | ^~~~ | ;
s803461502
p00031
C++
#include<iostream> using namespace std; bool a[10]; int main(){ int N; int i=0; while(!cin.eof()) { cin>>N; for(j=0;j<10;j++) { a[j]=0; } i=0; if(i+512 <= N){ i += 512; a[9] = 1; ...
a.cc: In function 'int main()': a.cc:16:13: error: 'j' was not declared in this scope 16 | for(j=0;j<10;j++) | ^
s260494379
p00031
C++
import std.stdio; import std.array; import std.conv; import std.algorithm; import std.math; void main() { string s; while( (s=readln()).length != 0 ){ string[] input = split(s); int a = to!int(input[0]); for(int i=0;i<10;i++){ if(a%2==1) write(pow(2,i)," "); a/=2; } writeln(); } }
a.cc:1:1: error: 'import' does not name a type 1 | import std.stdio; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import std.array; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: er...
s394345476
p00031
C++
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); public static void main(String[] args){ while(scan.hasNext()){ int w = scan.nextInt(); int i = 1; StringBuffer sb = new StringBuffer(); sb.setLength(0); while(w / 2 > 1){ if(w % 2 == 1){ s...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main{ | ^~~~~~
s316516554
p00031
C++
#include<iostream> #include<stdio.h> #include<string> #include<math.h> #include<iomanip> #include<algorithm> #include<string.h> #include<cctype> #include<map> #include<set> #include<vector> #include<sstream> #include<stack> #include<queue> using namespace std; int arr[10]={1,2,4,8,16,32,64,128,256...
a.cc: In function 'int main()': a.cc:33:50: error: expected ';' before 'cout' 33 | for(int i=0;i<count-1;i++) cout<<num[i]<<" " | ^ | ; 34 | cout<<num[count-1]<<endl; | ~~~~ ...
s598954287
p00031
C++
#include<iostream> #include<stdio.h> #include<string> #include<math.h> #include<iomanip> #include<algorithm> #include<string.h> #include<cctype> #include<map> #include<set> #include<vector> #include<sstream> #include<stack> #include<queue> using namespace std; int arr[10]={1,2,4,8,16,32,64,128,256...
a.cc: In function 'int main()': a.cc:37:33: error: 'i' was not declared in this scope 37 | if(num[count-1]) cout<<arr[i]<<endl; | ^
s603866006
p00031
C++
#include<iostream> using namespace std; int main(){ int n,b; int a[10],i; while(cin >> n){ fill_n(a,10,1024); b = 512; i=0; while(n != 0){ if(n >= b){ a[i] = b; i++; n -= b; } b /= 2; } sort(a,a+10); for(int j = 0;j < i;j++){ if(j == i-1) cout << a[j]...
a.cc: In function 'int main()': a.cc:20:5: error: 'sort' was not declared in this scope; did you mean 'short'? 20 | sort(a,a+10); | ^~~~ | short
s615916227
p00031
C++
#include<iostream> using namespace std; int main(){ int n,b; int a[10],i; while(cin >> n){ fill_n(a,10,1024); b = 512; i=0; while(n != 0){ if(n >= b){ a[i] = b; i++; n -= b; } if(b == 1) b--; else b /= 2; } sort(a,a+10); for(int j = 0;j < i;j++){ ...
a.cc: In function 'int main()': a.cc:21:5: error: 'sort' was not declared in this scope; did you mean 'short'? 21 | sort(a,a+10); | ^~~~ | short
s974922391
p00031
C++
#include<stdio.h> int main(){ int a,x[12],k,i; while(scanf("%d",&a)!=EOF){ k=0; if(a>=512){ x[k++]=512; a-=512; if(a>=256){ x[k++]=256; a-=256; } if(a>=128){ x[k++]=128; a-=128; } if(a>=64){ x[k++]=64; a-=64; } if(a>=32){ x[k++]=32; a-=32; } if(a>=16){ x[k++]=16; a-=16; } if(a>=8){ x[k++]=8; a-=8; } if(a>=4){ x[k++]=4;...
a.cc: In function 'int main()': a.cc:51:2: error: expected '}' at end of input 51 | } | ^ a.cc:2:11: note: to match this '{' 2 | int main(){ | ^
s813013047
p00031
C++
#include <iostream> #include <cstdio> using namespace std; int main() { int x; while (scanf("%d ", &x) == 1) { int omori = 512; while (x != 0) if (x % omori == 0) { x -= omori; cout << omori << " "; omori /= 2; } } } return 0; }
a.cc:19:3: error: expected unqualified-id before 'return' 19 | return 0; | ^~~~~~ a.cc:20:1: error: expected declaration before '}' token 20 | } | ^
s626365877
p00031
C++
#include <iostream> #include <cstdio> using namespace std; int main() { while (true) { int omori = 512, x; scanf("%d", &x); do { if (x % omori == 0) { x -= omori; cout << omori << " "; omori /= 2; } } while (x != 0); } return 0; } #include <iostream> #include <cstdio> using names...
a.cc:26:5: error: redefinition of 'int main()' 26 | int main() | ^~~~ a.cc:6:5: note: 'int main()' previously defined here 6 | int main() | ^~~~ a.cc: In function 'int main()': a.cc:28:24: error: 'x' was not declared in this scope 28 | while (scanf("%d ", &x) == 1) { | ...
s438981288
p00031
C++
#include <iostream> #include <cstdio> using namespace std; int main() { while (scanf("%d ", &x) == 1) { int omori = 512; while (x != 0) { if (x >= omori) { x -= omori; cout << omori << " "; omori /= 2; } } cout << endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:24: error: 'x' was not declared in this scope 8 | while (scanf("%d ", &x) == 1) { | ^
s594256980
p00031
C++
#include <iostream> using namespace std; int weight[10]; weight[1]=1; for(int i = 2;i<=9;i++)weight[i]=2*weight[i-1]; int main(){ while(true) { int object; cin >> object; if (cin.eof())break; for(int i =1;int <=9;i++){ if(object%2==1) { cout << weight[i] ; if( i != 9 ) cout << " "; } } cout <<...
a.cc:5:1: error: 'weight' does not name a type 5 | weight[1]=1; | ^~~~~~ a.cc:6:1: error: expected unqualified-id before 'for' 6 | for(int i = 2;i<=9;i++)weight[i]=2*weight[i-1]; | ^~~ a.cc:6:15: error: 'i' does not name a type 6 | for(int i = 2;i<=9;i++)weight[i]=2*weight[i-1]; | ...
s708763489
p00031
C++
#include <iostream> #include <cstdlib> #define TRUE 1 #define FALSE 0 int use_num[10]; int get_input(void) { int i; std::cin >> i; if (std::cin.fail()) exit(0); return i; } int power(int m, int n) { int acc = 1; for (int i = 0; i < n; i++) { acc *= m; } return acc; }...
a.cc: In function 'void output()': a.cc:43:31: error: 'i' was not declared in this scope 43 | std::cout << power(2, i); | ^
s260852147
p00031
C++
#include <iostream> using namespace std; int weight[] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512}; void solve() { int a; while(cin >> a) { bool flag[10]; memset(flag, 0, sizeof(bool) * 10); for(int i = 9; i >= 0; --i) { if(a / weight[i]) { flag[i] = true; } a %= weight[i]; } for(int i = 0...
a.cc: In function 'void solve()': a.cc:11:17: error: 'memset' was not declared in this scope 11 | memset(flag, 0, sizeof(bool) * 10); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <io...
s840546713
p00031
C++
n,k;main(a){for(;~scanf("%d",&n);puts())for(k=1;n;n^=a)k=!printf(k+" %d",a=n&-n);}
a.cc:1:1: error: 'n' does not name a type 1 | n,k;main(a){for(;~scanf("%d",&n);puts())for(k=1;n;n^=a)k=!printf(k+" %d",a=n&-n);} | ^ a.cc:1:9: error: expected constructor, destructor, or type conversion before '(' token 1 | n,k;main(a){for(;~scanf("%d",&n);puts())for(k=1;n;n^=a)k=!printf(k+" %d",a=n&-n);}...
s006102331
p00031
C++
#include<iostream> #include<algorithm> using namespace std; #define INF 100000 int main(){ int w; bool ans[10]; for(int i=0;i<9;i++){ ans[i]=0; } while(cin>>w){ for(int i=10;i--;){ if(w>=pow(2,i)){ ans[i]=1; w=w-pow(2,i); } } if(ans[0]){ cout<<1; } for(int i=1;i<11;i++){ if(an...
a.cc: In function 'int main()': a.cc:16:31: error: 'pow' was not declared in this scope 16 | if(w>=pow(2,i)){ | ^~~ a.cc:27:44: error: 'pow' was not declared in this scope 27 | cout<<" "<<pow(2,i); | ...
s970818786
p00031
C++
#include <iostream> using namespace std; int main(){ int n; int g; while(cin >>n){ g=1; while(g<1000){ if(n%(2*g)==g&&n!=0;){cout <<g<<" "; n=n-g;} else if(n%(2*g)==g&&n==g){cout <<g<<endl; n=n-g;} g=g*2;} } }
a.cc: In function 'int main()': a.cc:9:21: error: expected primary-expression before ')' token 9 | if(n%(2*g)==g&&n!=0;){cout <<g<<" "; n=n-g;} | ^
s520837071
p00031
C++
#include <iostream> using namespace std; int factorial(int n){ if(n==0) return 1 ; else return(2*factorial(n-1)) ; } int main(){ int x; while(cin>>x){ int ans[10]={0};int ptr=0;int sum=0; for(int i=9;i>=0;i--){ if(x==sum) break; int temp=factorial(i); if(x>=sum+temp) {ans[ptr++]=temp;sum+=temp;}; }; ...
a.cc: In function 'int main()': a.cc:19:11: error: expected '}' at end of input 19 | }; | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s891843632
p00031
C++
#include <stdio.h> int main(void) { int n; while (scanf("%d", &n) != EOF){ int i; if ((n & 1) != 0) { printf("1"); } for (i = 1; i < 20; i++) { if (((n >> i) & 1) != 0 printf(" %d", 2 << i); } } puts(""); }
a.cc: In function 'int main()': a.cc:13:24: error: expected ';' before 'printf' 13 | if (((n >> i) & 1) != 0 | ^ | ; 14 | printf(" %d", 2 << i); | ~~~~~~ a.cc:15:1: error: expected primary-expression before '}' token 15 | } ...
s327390563
p00031
C++
#include <stdio.h> int main(void) { int n; while (scanf("%d", &n) != EOF){ int i; if ((n & 1) != 0) { printf("1"); } for (i = 1; i < 20; i++) { if (((n >> i) & 1) != 0){ printf(" %d", 2 << i); } } puts(""); }
a.cc: In function 'int main()': a.cc:18:2: error: expected '}' at end of input 18 | } | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s585119470
p00031
C++
#include <iostream> #include <math.h> using namespace std; int main(){ int n; while(cin >> n;){ int weight[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; for(int i = 9; i >= 0; i--){ if(n >= pow(2, i)){ n -= pow(2, i); weight[i] = 1; } } cout << "1"; for(int i = 1; i < 10; i++){ if(weight[i]){ ...
a.cc: In function 'int main()': a.cc:7:23: error: expected ')' before ';' token 7 | while(cin >> n;){ | ~ ^ | ) a.cc:7:24: error: expected primary-expression before ')' token 7 | while(cin >> n;){ | ^
s705163637
p00031
C++
#include<iostream> using namesapce std; int main(){ int n,bell,heavy[1000]={0}; while(cin >> n){ bell=0; if(n>=512){ n-=512; heavy[512]++; } if(n>=256){ n-=256; heavy[256]++; } if(n>=128){ n-=128; heavy[128]++; } if(n>=64){ n-=64; heavy...
a.cc:2:7: error: expected nested-name-specifier before 'namesapce' 2 | using namesapce std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | while(cin >> n){ | ^~~ | std::cin In file included...
s608563658
p00031
C++
#include<iostream> #include<vector> #include<algorithm> int main() { const int weight[] = {1,2,4,8,16,32,64,128,256,512}; std::vector<int> answer; int n; while(std::cin >> n) { for(size_t i=0; i<10; ++i) { if(n/weight[9-i]) { answer.p...
a.cc:40:94: error: invalid digit "8" in octal constant 40 | Judge: 1/1 C++ CPU: 00.00 sec Memory: 1212 [KB] Length: 476 [B] 2012-08-29 02:02 2012-08-29 02:02 | ^~ a.cc:40:118: error: inva...
s962875302
p00031
C++
#include<iostream> using namespace std; int main(void) { int x; while(cin>>x) { int a[10]={1,2,4,8,16,32,64,128,256,512}; int b[10]={0}; int j=0; for(int i=9;i>=0;i--) { if(x>=a[i]) { x-=a[i]; b[j]=a[i]; j++; if(x==0)break; } } for(int i=9;i>=0;i--) { (b[i]!=0)cout<<b[i]<<(i==0?"\n":" "); } } return 0; }
a.cc: In function 'int main()': a.cc:24:10: error: expected ';' before 'cout' 24 | (b[i]!=0)cout<<b[i]<<(i==0?"\n":" "); | ^~~~ | ;
s957871486
p00032
Java
import java.util.*; public class AOJ0032 { public static void main(String[] args){ Scanner sc = new Scanner(System.in); String s=""; String[] a=new String[3]; int[] b=new int[3]; int ch=0,hi=0; while(true){ s=sc.nextLine(); if(s==null){ ...
Main.java:3: error: class AOJ0032 is public, should be declared in a file named AOJ0032.java public class AOJ0032 { ^ 1 error
s021749651
p00032
Java
import java.io.*; class Main{ public static void main(String[] args) throws IOExceptiion{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int rec=0; int loz=0; String line; while((line=br.readLine())!=null){ String[] value=line.split(","); int s1=Integer.parseInt(value[0]); int s2=Integer.parse...
Main.java:4: error: cannot find symbol public static void main(String[] args) throws IOExceptiion{ ^ symbol: class IOExceptiion location: class Main 1 error
s446147365
p00032
Java
import java.util.Scanner; public class Exercises1 { public static void main(String[] args){ Scanner scan = new Scanner(System.in); int Rhombus = 0; int Rectangle = 0; while(scan.hasNext()){ String text = scan.next(); String[] num = text.split(",", 0); int a = Integer.parseInt(num[0]); int b = Integ...
Main.java:2: error: class Exercises1 is public, should be declared in a file named Exercises1.java public class Exercises1 { ^ 1 error
s795399288
p00032
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); public static void main(String[] args){ while(scan.hasNext()){ int r = 0; int d = 0; int a = scan.nextInt(); int b = scan.nextInt(); int c = scan.nextInt(); if(Math.pow(c, 2) == Math.hypot((double...
Main.java:22: error: cannot find symbol System.out.printf("%d\n", r); ^ symbol: variable r location: class Main Main.java:23: error: cannot find symbol System.out.printf("%d\n", d); ^ symbol: variable d location: class Main 2 errors
s631561865
p00032
Java
import java.util.Scanner; public class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int rectangular = 0; int dimond = 0; while(sc.hasNext()) { String[] numbers = sc.nextLine().split(","); int a = Integer.parseInt(numbers[0]); int b = Integer.parseInt(n...
Main.java:27: error: reached end of file while parsing } ^ 1 error
s403504082
p00032
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class AOJ_0032 { public static void main(String[] args) throws IOException { BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); int rectanglesCount = 0; int lozengesCount = 0;...
Main.java:5: error: class AOJ_0032 is public, should be declared in a file named AOJ_0032.java public class AOJ_0032 ^ 1 error
s657281518
p00032
Java
import java.io.*;import java.util.*;class Main{public static void main(String[]a)throws Exception{int i,h,x=0,y=0,t[]=new int[3];Set<Integer> H=new HashSet<Integer>();BufferedReader B=new BufferedReader(new InputStreamReader(System.in));for(String s;(s=B.readLine())!=null;){a=s.split(",");for(i=0;i<3;)t[i]=Integer.valu...
Main.java:1: error: as of release 9, '_' is a keyword, and may not be used as an identifier import java.io.*;import java.util.*;class Main{public static void main(String[]a)throws Exception{int i,h,x=0,y=0,t[]=new int[3];Set<Integer> H=new HashSet<Integer>();BufferedReader B=new BufferedReader(new InputStreamReader(Sys...
s227433681
p00032
Java
import java.util.Scanner; public class main{ public static void main(String[] args) { // TODO 自動生成されたメソッド・ス Scanner sc = new Scanner(System.in); int tyou=0; int hishi=0; int c1 = 0; int c2 = 0; while(sc.hasNext()){ String[] s=sc.nextLine().split(","); int a=I...
Main.java:3: error: class main is public, should be declared in a file named main.java public class main{ ^ 1 error
s284849317
p00032
Java
public class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { judgeSquare(); } private static void judgeSquare() { int lect = 0; int diamond = 0; while (sc.hasNext()) { String[] str = sc.nextLine().split(","); int a = Integer.parseInt(str[0]); int ...
Main.java:3: error: cannot find symbol static Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol static Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s885887209
p00032
Java
import java.io.*; public class Main { public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int rec=0,rho=0; int a,b,d; String str; try{ while((str=br.readLine())!=null){ str=br.readLine(); String[] s=str.split(","); ...
Main.java:21: error: reached end of file while parsing } ^ 1 error
s594222231
p00032
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.*; public class Main{ static int N, D, money; static int[] prices; private static int solve(){ int answer = 0; if (prices[0] * 2 > money) return 0; if (prices[prices.length - 1] + prices[prices.length - 2] <...
Main.java:24: error: unreported exception IOException; must be caught or declared to be thrown String[] strs = br.readLine().split(","); ^ Main.java:28: error: unreported exception IOException; must be caught or declared to be thrown prices[i] = Integer.parseInt(br...
s700687282
p00032
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.*; public class Main{ static int N, D, money; static int[] prices; private static int solve(){ int answer = 0; if (prices[0] * 2 > money) return 0; if (prices[prices.length - 1] + prices[prices.length - 2] <= m...
Main.java:36: error: '(' expected } catch{} ^ 1 error
s319127689
p00032
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.*; public class Main{ static int N, D, money; static int[] prices; private static int solve(){ int answer = 0; if (prices[0] * 2 > money) return 0; if (prices[prices.length - 1] + prices[prices.length - 2] <= m...
Main.java:36: error: illegal start of type } catch(){} ^ 1 error
s219691552
p00032
C
#include<stdio.h> #include<conio.h> int main (void ){ int a,b,c,p=0,q=0; while(scanf("%d,",&a)!=EOF){ scanf("%d,%d",&b,&c); if(a+b+c == 12){ p++; } else if(a == b){ q++; } } printf("%d\n%d\n",p,q); return 0; }
main.c:2:9: fatal error: conio.h: No such file or directory 2 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s484117753
p00032
C
#include<stdio.h> int main(void) { int hen1 = 0, hen2 = 0, x = 0; int ccount = 0 , hcount = 0; while(scanf("%d,%d,%d",&hen1, &hen2, &x) != EOF) { if(x >= hen1 && x >= hen2) { else if(hen1 == hen2) { ...
main.c: In function 'main': main.c:14:25: error: expected '}' before 'else' 14 | else if(hen1 == hen2) | ^~~~ main.c: At top level: main.c:24:16: error: expected declaration specifiers or '...' before string constant 24 | printf("%d\n",ccount); |...
s142453838
p00032
C
#include<stdio.h> int main(){ int h1,h2,tai,tcnt,hcnt; tcnt =0; hcnt=0; while(scanf("%d,%d,%d",&h1,&h2,&tai)!=EOF){ if(hi*hi+h2*h2=tai){tcnt=tcnt+1;} else if(h1==h2){hcnt=hcnt+1;} printf("%d\n%d\n ",tcnt,hcnt); } return 0; }
main.c: In function 'main': main.c:11:6: error: 'hi' undeclared (first use in this function); did you mean 'h2'? 11 | if(hi*hi+h2*h2=tai){tcnt=tcnt+1;} | ^~ | h2 main.c:11:6: note: each undeclared identifier is reported only once for each function it appears in
s570590677
p00032
C
#include<stdio.h> int main(){ int h1,h2,tai,tcnt,hcnt; tcnt =0; hcnt=0; while(scanf("%d,%d,%d",&h1,&h2,&tai)!=EOF){ if(h1*h1+h2*h2=tai){tcnt=tcnt+1;} else if(h1==h2){hcnt=hcnt+1;} printf("%d\n%d\n ",tcnt,hcnt); } return 0; }
main.c: In function 'main': main.c:11:17: error: lvalue required as left operand of assignment 11 | if(h1*h1+h2*h2=tai){tcnt=tcnt+1;} | ^
s465614103
p00032
C
#include<stdio.h> int main(){ int a,b,c,m=0,n=0; while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){ if(a-b==0) m++; if(a*a+b*b-c*c==0) n++; } printf("%d\n%d\n",n.m); return 0; }
main.c: In function 'main': main.c:10:20: error: request for member 'm' in something not a structure or union 10 | printf("%d\n%d\n",n.m); | ^
s571005249
p00032
C
#include<stdio.h> main(){ int a[3],tyo=0,hi=0,i,j,temp; while(scanf("%d,%d,%d",&a[0],&a[1],&a[2])!=EOF){ */ if(a[0]!=a[1] && a[0]*a[0]+a[1]*a[1]==a[2]*a[2]) tyo++; if(a[0]==a[1]) hi++; printf("%d ",tyo); } printf("%d\n%d\n",tyo,hi); return 0; }
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:6:6: error: expected expression before '/' token 6 | */ | ^
s911238955
p00032
C
int main(void){ int hen1,hen2,taikaku,tyouhou=0,hisigata=0; while(scanf("%d,%d,%d",&hen1,&hen2,&taikaku) != EOF){ if(sqrt(hen1*hen1 + hen2*hen2) == taikaku && hen1 == hen2){ // 正方形 }else if(sqrt(hen1*hen1 + hen2*hen2) == taikaku){ // 長方形 tyouhou++; }else if(hen1 == hen2){ hisigata++; } } print...
main.c: In function 'main': main.c:4:15: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 4 | while(scanf("%d,%d,%d",&hen1,&hen2,&taikaku) != EOF){ | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h...
s388024616
p00032
C
#include <stdio.h> int main(){ int a,b,c,n1,n2; n1=0; n2=0; while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){ if(c*c=a*a+b*b) n1++; if(a==b) n2++; } printf("%d\n%d\n",n1,n2); } return 0; }
main.c: In function 'main': main.c:9:13: error: lvalue required as left operand of assignment 9 | if(c*c=a*a+b*b) | ^ main.c: At top level: main.c:16:4: error: expected identifier or '(' before 'return' 16 | return 0; | ^~~~~~ main.c:17:1: error: expected identifier or '(' bef...
s324525074
p00032
C
#include <stdio.h> int main(){ int a,b,c,n1,n2; n1=0; n2=0; while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){ if(c*c=a*a+b*b) n1++; if(a==b) n2++; } printf("%d\n%d\n",n1,n2); return 0; }
main.c: In function 'main': main.c:9:13: error: lvalue required as left operand of assignment 9 | if(c*c=a*a+b*b) | ^
s432192086
p00032
C
#include <stdio.h> #include <math.h> #define SQ(x) ((x) * (x)) int main(void) { int x[3]; int rect, dia; rect = 0; dia = 0; while (scanf("%d,%d,%d", &x[0], &x[1], &x[2]) != EOF){ if (SQ(x[0]) == SQ(x[1]) + SQ(x[2])){ rect++; } else if (SQ[1] == SQ2[2]){ dia++; } } printf("%d\n%d\n", r...
main.c: In function 'main': main.c:19:26: error: 'SQ' undeclared (first use in this function) 19 | else if (SQ[1] == SQ2[2]){ | ^~ main.c:19:26: note: each undeclared identifier is reported only once for each function it appears in main.c:19:35: error: 'SQ2' undeclared ...
s537585696
p00032
C++
#include <iostream> using namespace std; int main(void){ // Your code here! int a, b; //隣り合う辺の長さ int c;  //対角線の長さ int rectangular = 0, rhombus = 0; //長方形と菱形の個数 while(cin.fail()){ cin >> a >> b >> c; if(a != b && a + b >= c && a * a + b * b == c * c) rectangular++; else i...
a.cc:6:11: error: extended character   is not valid in an identifier 6 | int c;  //対角線の長さ | ^ a.cc:6:11: error: extended character   is not valid in an identifier a.cc: In function 'int main()': a.cc:6:11: error: '\U00003000\U00003000' was not declared in this scope 6 | int c;  //対角線の長さ ...
s181019752
p00032
C++
p (r=$<.map{|l|a,b,c=l.split/,/.map{|i|i.to_i**2};a+b!=c&&a-b}).count(!0),r.count(0)
a.cc:1:3: error: expected constructor, destructor, or type conversion before '(' token 1 | p (r=$<.map{|l|a,b,c=l.split/,/.map{|i|i.to_i**2};a+b!=c&&a-b}).count(!0),r.count(0) | ^ a.cc:1:63: error: expected unqualified-id before ')' token 1 | p (r=$<.map{|l|a,b,c=l.split/,/.map{|i|i.to_i**2};a+b!=c&&a-b...
s900471753
p00032
C++
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <algorithm> #include <vector> #include <cstdlib> #include <cstdio> #include <string> using namespace std; #define TYO 0 #define HIS 1 int main(){ int in1, in2, in3; int ans[2] = {}; while (scanf("%d,%d,%d", &in1, &in2, &in3) != EOF){ // 長方形check if ...
a.cc: In function 'int main()': a.cc:19:21: error: 'pow' was not declared in this scope 19 | if (pow(in1, 2) + pow(in2, 2) == pow(in3, 2)){ | ^~~
s837449558
p00032
C++
// #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <algorithm> #include <vector> #include <cstdlib> #include <cstdio> #include <string> using namespace std; #define TYO 0 #define HIS 1 int main(){ int in1, in2, in3; int ans[2] = {}; while (scanf("%d,%d,%d", &in1, &in2, &in3) != EOF){ // 長方形check ...
a.cc: In function 'int main()': a.cc:19:21: error: 'pow' was not declared in this scope 19 | if (pow(in1, 2) + pow(in2, 2) == pow(in3, 2)){ | ^~~
s861176526
p00032
C++
#include <iostream> using namespace std; &#160;&#160; int main(){ &#160;&#160;&#160;&#160;int c = 0, h = 0; &#160;&#160;&#160;&#160;int s1, s2, t; &#160;&#160;&#160;&#160;char a, b; &#160;&#160;&#160;&#160;while(cin >> s1 >> a >> s2 >> b >> t) &#160;&#160;&#160;{ &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if(((s1 ...
a.cc:3:2: error: stray '#' in program 3 | &#160;&#160; | ^ a.cc:3:8: error: stray '#' in program 3 | &#160;&#160; | ^ a.cc:5:2: error: stray '#' in program 5 | &#160;&#160;&#160;&#160;int c = 0, h = 0; | ^ a.cc:5:8: error: stray '#' in program 5 | &#160;&#160;&#160;&#160;int c...
s945420690
p00032
C++
#include <iostream> #include <sstream> #include <string> using namespace std; int main(void) { string s; int rect = 0, rhom = 0; while (cin >> s) { replace(s.begin(), s.end(), ',', ' '); stringstream ss(s); int x, y, z; ss >> x >> y >> z; if (x == y || y == z || z =...
a.cc: In function 'int main()': a.cc:10:9: error: 'replace' was not declared in this scope 10 | replace(s.begin(), s.end(), ',', ' '); | ^~~~~~~
s259269893
p00032
C++
#include <iostream> #include <string> #include <sstream> using namespace std; int main(void) { string s; int rect = 0, rhom = 0; while (cin >> s) { replace(s.begin(), s.end(), ',', ' '); stringstream ss(s); int x, y, z; ss >> x >> y >> z; if (x == y || y == z || z =...
a.cc: In function 'int main()': a.cc:10:9: error: 'replace' was not declared in this scope 10 | replace(s.begin(), s.end(), ',', ' '); | ^~~~~~~
s255236959
p00032
C++
#include <iostream> #include <algorithm> using namespace std; int main(void){ int a[3],ans[2]; char com; ans[0]=0;ans[1]=0; while(cin>>a[0]>>com>>a[1]>>com>>a[2]){ if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1])ans[0]++; if(a[0]==a[1])ans[1]++; } cout<<ans[0]<<endl<<ans[1]<<endl; return 0;
a.cc: In function 'int main()': a.cc:13:18: error: expected '}' at end of input 13 | return 0; | ^ a.cc:4:15: note: to match this '{' 4 | int main(void){ | ^
s417597535
p00032
C++
#include<stdio.h> int main(){ int x,y,z; int N=0,W=0; while(scanf("%d %d %d",&x,&y,&z)!=EOF){ if(x==y)N++; else if(x!=y)W++; } printf("%d\n,N);printf("%d\n,W); return 0; }
a.cc:11:27: error: stray '\' in program 11 | printf("%d\n,N);printf("%d\n,W); | ^ a.cc: In function 'int main()': a.cc:11:26: error: 'd' was not declared in this scope 11 | printf("%d\n,N);printf("%d\n,W); | ^
s889416729
p00032
C++
#include<stdio.h> int main(){ int x,y,z; int N=0,W=0; while(scanf("%d,%d,%d,&x,&y,&z)!=EOF){ if(x!=y)N++; else if(x==y)W++; } printf("%d\n%d\n,N,W); return 0; }
a.cc:6:13: warning: missing terminating " character 6 | while(scanf("%d,%d,%d,&x,&y,&z)!=EOF){ | ^ a.cc:6:13: error: missing terminating " character 6 | while(scanf("%d,%d,%d,&x,&y,&z)!=EOF){ | ^~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:10:8: warning: missing terminating " character ...
s398675861
p00032
C++
#include<stdio.h> int main(){ int x,y,z; int N=0,W=0; while(scanf("%d,%d,%d",&x,&y,&z)!=EOF){ if(z*z=x*x+y*y)N++; else if(x==y)W++; } printf("%d\n%d\n",N,W); return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: lvalue required as left operand of assignment 7 | if(z*z=x*x+y*y)N++; | ~^~
s902937090
p00032
C++
3,4,5 5,5,8 4,4,4 5,4,3
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3,4,5 | ^
s749245314
p00032
C++
include <cstdio> using namespace std; int main(){ int a, b, c, ans1=0, ans2=0; while( scanf("%d,%d,%d", &a,&b,&c) != EOF ){ if( a*a + b*b == c*c ) ans1++; else if( a == b ) ans2++; } printf("%d\n%d\n", ans1, ans2); }
a.cc:1:1: error: 'include' does not name a type 1 | include <cstdio> | ^~~~~~~ a.cc: In function 'int main()': a.cc:7:16: error: 'scanf' was not declared in this scope 7 | while( scanf("%d,%d,%d", &a,&b,&c) != EOF ){ | ^~~~~ a.cc:7:47: error: 'EOF' was not declared in this sco...
s319090979
p00032
C++
include <cstdio> using namespace std; int main(){ int a, b, c, ans1=0, ans2=0; while( scanf("%d,%d,%d", &a,&b,&c) != EOF ){ if( a*a + b*b == c*c ) ans1++; else if( a == b ) ans2++; } printf("%d\n%d\n", ans1, ans2); }
a.cc:1:1: error: 'include' does not name a type 1 | include <cstdio> | ^~~~~~~ a.cc: In function 'int main()': a.cc:7:16: error: 'scanf' was not declared in this scope 7 | while( scanf("%d,%d,%d", &a,&b,&c) != EOF ){ | ^~~~~ a.cc:7:47: error: 'EOF' was not declared in this sco...
s491641162
p00032
C++
#include <iostream> using namespace std; int main(){ int a, b, c; int cho=0; int hi=0; while(cin >> a >> " " >> b >> " " >> c){ if(a*a + b*b = c*c){ cho = cho + 1; } if(a==b){ hi = hi + 1; } } cout << cho << endl; cout << hi << endl; }
a.cc: In function 'int main()': a.cc:10:24: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'const char [2]') 10 | while(cin >> a >> " " >> b >> " " >> c){ | ~~~~~~~~ ^~ ~~~ | | ...
s186851574
p00032
C++
#include <iostream> using namespace std; int main(){ int a, b, c; int cho=0; int hi=0; while(cin >> a >> b >> c){ if(a*a + b*b = c*c){ cho = cho + 1; } if(a==b){ hi = hi + 1; } } cout << cho << endl; cout << hi << endl; }
a.cc: In function 'int main()': a.cc:13:24: error: lvalue required as left operand of assignment 13 | if(a*a + b*b = c*c){ | ~~~~^~~~~
s507609575
p00032
C++
#include <iostream> using namespace std; int main(){ int a, b, c; int cho=0; int hi=0; while(cin >> a >> b >> c){ if(a*a + b*b = c*c){ cho = cho + 1; } if(a==b){ hi = hi + 1; } } cout << cho << endl; cout << hi << endl; }
a.cc: In function 'int main()': a.cc:13:24: error: lvalue required as left operand of assignment 13 | if(a*a + b*b = c*c){ | ~~~~^~~~~
s804832197
p00032
C++
#include<iostream> #include<cstdio> using namespace std; int main() { int a, b, c; int r = 0; int l = 0; while (scanf_s("%d,%d,%d", &a, &b, &c) != EOF ) { if (a*a + b*b == c*c) {//??´?§?????§???¢ r++; } else if (a == b) {//?????????????§???¢ l++; } } cout << r << endl; cout << l << endl; ret...
a.cc: In function 'int main()': a.cc:10:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 10 | while (scanf_s("%d,%d,%d", &a, &b, &c) != EOF ) { | ^~~~~~~ | scanf
s804684627
p00032
C++
#include<iostream> #include<cmath> using namespace std; int main(){ int a, b, c; while(cin >> a >> b >>c){ int rect,rhom; if(a * a + b * b == c * c) rect++; else if(a == b) rhom++; } cout << rect << "?\n" << rhom << endl; }
a.cc: In function 'int main()': a.cc:11:17: error: 'rect' was not declared in this scope 11 | cout << rect << "?\n" << rhom << endl; | ^~~~ a.cc:11:34: error: 'rhom' was not declared in this scope 11 | cout << rect << "?\n" << rhom << endl; | ...
s519533209
p00032
C++
#include<iostream> using namespace std; int main(){ int a, b, c, rect, = 0, rhom = 0; while(cin >> a >> b >> c){ if( a * a + b * b == c * c ) rect++; else if( a == b ) rhom++; } cout << rect << "?\n" << rhom << endl; }
a.cc: In function 'int main()': a.cc:4:28: error: expected unqualified-id before '=' token 4 | int a, b, c, rect, = 0, rhom = 0; | ^ a.cc:7:35: error: 'rhom' was not declared in this scope 7 | else if( a == b ) rhom++; | ...
s056018001
p00032
C++
#include<iostream> using namespace std; int main(){ int a, b, c, rect = 0, rhom = 0; char d while(cin >> a >> d >> b >> d >> c){ if( a * a + b * b == c * c ) rect++; else if( a == b ) rhom++; } cout << rect << endl << rhom << endl; }
a.cc: In function 'int main()': a.cc:6:9: error: expected initializer before 'while' 6 | while(cin >> a >> d >> b >> d >> c){ | ^~~~~
s421651630
p00032
C++
#include <bits/stdc++.h> using namespace std; /*-------------------------------*/ #define FOR(i, a, b) for(int i = (a); i < (b); i++) #define RFOR(i, a, b) for(int i = (b) - 1; i >= (a); i--) #define REP(i, n) for(int i = 0; i < (n); i++) #define RREP(i, n) for(int i = (n) - 1; i >= 0; i--) #define all(i) (i).begi...
a.cc: In function 'int main()': a.cc:29:9: error: 'x' was not declared in this scope 29 | if (x[0] == x[1]) rhom++; | ^
s415312325
p00032
C++
#include<iostream> #include<stdio.h> using namespace std; int main() { int a, b, c; int co = 0, cp = 0; while (scanf_s("%d,%d,%d", &a, &b, &c) + 1) { if ((a*a) + (b*b) == c*c) { co++; } if (a + b > c) { cp++; } } cout << co << "\n" << cp << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 8 | while (scanf_s("%d,%d,%d", &a, &b, &c) + 1) { | ^~~~~~~ | scanf
s021154628
p00032
C++
import sys rec=rho=0 for line in sys.stdin: #while True: # line=raw_input() if line=="a": break a,b,c=map(int,line.split(",")) if a==b: rho+=1 elif a*a+b*b==c*c: rec+=1 print rec print rho
a.cc:4:2: error: invalid preprocessing directive #while 4 | #while True: | ^~~~~ a.cc:5:13: error: "=" after #line is not a positive integer 5 | # line=raw_input() | ^ a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' o...
s733696030
p00032
C++
#include <iostream> #include <stdio.h> #include <stdlib.h> int main(){ int a, b, c; int tyou = 0; int hishi = 0; while(scanf("%d %d %d", &a, &b, &c)!=EOF){ if(a==b || a==c || b==c){ if(a+b>c && b+c>a && c+a>b){ hishi++; }else{ if(a>b){ if(a>c){ if(a*a==b*b+c*c) ...
a.cc: In function 'int main()': a.cc:34:2: error: expected '}' at end of input 34 | } | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s056344716
p00032
C++
#include <iostream> #include <stdio.h> #include <stdlib.h> int main(){ int a, b, c; int tyou = 0; int hishi = 0; while(scanf("%d,%d,%d\n", &a, &b, &c)!=EOF){ if(a==b || a==c || b==c){ if(a+b>c && b+c>a && c+a>b){ hishi++; } } if{ if(a>b){ if(a>c){ if(a...
a.cc: In function 'int main()': a.cc:16:7: error: expected '(' before '{' token 16 | if{ | ^ | (
s108151830
p00032
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main() { vector<vector<int>> n; int ch = 0; int hisi = 0; int i, j,k,l = 0; while (scanf_s("%d,%d,%d",&i,&j,&k) != EOF) { vector<int>v; v.push_back(i); v.push_back(j); v.push_back(k); sort(&v[0], &v[2]); n.push_back(v)...
a.cc: In function 'int main()': a.cc:12:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 12 | while (scanf_s("%d,%d,%d",&i,&j,&k) != EOF) { | ^~~~~~~ | scanf
s920775652
p00032
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main() { vector<vector<int> > n; int ch = 0; int hisi = 0; int i, j,k,l = 0; while (scanf_s("%d,%d,%d",&i,&j,&k) != EOF) { vector<int>v; v.push_back(i); v.push_back(j); v.push_back(k); sort(&v[0], &v[2]); n.push_back(v...
a.cc: In function 'int main()': a.cc:12:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 12 | while (scanf_s("%d,%d,%d",&i,&j,&k) != EOF) { | ^~~~~~~ | scanf