submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s697930741
p03962
C++
using namespace std; int hako[111]; int main(){ int a,b,c; cin>>a>>b>>c; hako[a]=1; hako[b]=1; hako[c]=1; a=0; for(int i=0;i<111;i++){ a+=hako[i]; } cout<<a<<endl; return 0; }
a.cc: In function 'int main()': a.cc:5:1: error: 'cin' was not declared in this scope 5 | cin>>a>>b>>c; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:13:1: error: 'cout'...
s275284790
p03962
C++
int hako[111]; int main(){ int a,b,c; std::cin>>a>>b>>c; hako[a]=1; hako[b]=1; hako[c]=1; a=0; for(int i=0;i<111;i++){ a+=hako[i]; } std::cout<<a<<std::endl; return 0; }
a.cc: In function 'int main()': a.cc:4:6: error: 'cin' is not a member of 'std' 4 | std::cin>>a>>b>>c; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | int hako[111]; a.cc:12:6: error: 'cout' i...
s957215860
p03962
C++
#include <bits/stdc++.h> using namespace std; int main (){ int N,K; cin >>N >>K; int ans = K for (int i=0; i<N-1;i++){ ans = ans * (K-1); } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:9:5: error: expected ',' or ';' before 'for' 9 | for (int i=0; i<N-1;i++){ | ^~~ a.cc:9:19: error: 'i' was not declared in this scope 9 | for (int i=0; i<N-1;i++){ | ^
s277816577
p03962
C++
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if(a == b && b == c) { cout << 3 << endl; } else if(a == b b == c || a == c) { cout << 2 << endl; } else { cout << 1 << endl; } }
a.cc: In function 'int main()': a.cc:9:19: error: expected ')' before 'b' 9 | } else if(a == b b == c || a == c) { | ~ ^ ~ | )
s872059279
p03962
C++
#include <iostream> #include <string> using namespace std; int main() { int a[3]; cin >> a[0] >> a[1] >> a[2]; sort(a, a + 3); int n = 3; if (a[1] == a[2]) { n = n - 1; } if(a[0]==a[1]) { n = n - 1; } cout << n << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: 'sort' was not declared in this scope; did you mean 'short'? 10 | sort(a, a + 3); | ^~~~ | short
s877071777
p03962
C++
#include <iostream> using namespace std; int main(void){ int a,c,b=1,d; cin>>a; cin>>c; if(c!=a){ b++; } cin>>d; if(d!=a&&d!=c){ b++; } } cout<<b<<endl; }
a.cc:15:5: error: 'cout' does not name a type 15 | cout<<b<<endl; | ^~~~ a.cc:17:1: error: expected declaration before '}' token 17 | } | ^
s852524401
p03962
C++
#include <bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<double> vd; typedef vector<vd> vvd; typedef vector<vvd> vvvd; typedef pair<int, int> pii; typedef vector<pii> vpii; #define LL long long; #define REP(i,s,N) for (int i=s; i<N; i++) int main() { vi a(3,0); i...
a.cc: In function 'int main()': a.cc:18:29: error: expected primary-expression before '[' token 18 | REP(i,0,3) cin >> vi[i]; | ^ a.cc:19:16: error: expected primary-expression before '.' token 19 | sort(vi.begin(), vi.end()); | ^ a.cc:19:28: ...
s750701189
p03962
C++
import std.algorithm, std.string, std.array, std.range, std.stdio, std.conv; void main() { readln.chomp.split.to!(int[]).sort!"a<b".uniq.array.length.writeln; }
a.cc:1:1: error: 'import' does not name a type 1 | import std.algorithm, | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:8:1: error: '::main' must return 'int' 8 | void main() { | ^~~~ a.cc: In function 'int main()': a.cc:9:3: error: 'readln' was not declared in this ...
s871588553
p03962
C++
import java.util.*; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int sum =3; if(a == b) sum-=1; if(a == c) sum-=1; if(b == c) sum-=1; System.out....
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:2:1: error: expected unqualified-id before 'public' 2 | public class Main { | ^~~~~~
s541672382
p03962
C++
import java.util.*; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int sum =3; if(a == b) sum-=1; if(a == c) sum-=1; if(b == c) sum-=1; System.out...
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:2:1: error: expected unqualified-id before 'public' 2 | public class Main { | ^~~~~~
s204774080
p03962
Java
import java.util.*; public class Main { public class A_AtCoDeerandPaintCans { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if(a == b && b == c){ System.out.println(1); }else if(a == b || b == c || a == c){...
Main.java:17: error: reached end of file while parsing } ^ 1 error
s581130583
p03962
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if(a == b || a == c || b == c){ System.out.println("2"); }elseif(a == b =...
Main.java:10: error: ';' expected }elseif(a == b == c){ ^ Main.java:12: error: 'else' without 'if' }else{ ^ 2 errors
s643468117
p03962
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); double N = sc.nextInt(); double K = sc.nextInt(); double cnt = K * (Math.pow(K-1.0,N-1.0)); System.out.println(int)(cnt); } }
Main.java:8: error: '.class' expected System.out.println(int)(cnt); ^ Main.java:8: error: ';' expected System.out.println(int)(cnt); ^ Main.java:8: error: not a statement System.out.println(int)(cnt); ^ ...
s197729305
p03962
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); String c = sc.next(); double N = sc.nextInt(); double K = sc.nextInt(); double cnt = K * (Math.(K-1,N-1)); System.out.println(cnt); } }
Main.java:9: error: <identifier> expected double cnt = K * (Math.(K-1,N-1)); ^ 1 error
s717263782
p03962
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); String c = sc.next(); int N = sc.nextInt(); int K = sc.nextInt(); int cnt = K * (int)(Math.(K-1,N-1)); System.out.println(cnt); } }
Main.java:9: error: <identifier> expected int cnt = K * (int)(Math.(K-1,N-1)); ^ 1 error
s661455549
p03962
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a =sc.nextInt(); int b =sc.nextInt(); int c =sc.nextInt(); if((a==b) && (b==c)){ System.out.println("1"); }else if((a==b && b!=c) || (b==c && b!=a) ||(a=c && b!=a)){ System.out.pri...
Main.java:10: error: bad operand types for binary operator '&&' }else if((a==b && b!=c) || (b==c && b!=a) ||(a=c && b!=a)){ ^ first type: int second type: boolean Main.java:10: error: bad operand types for binary operator '||' }else if((a==b && b!=c) || (b==c && ...
s424133089
p03962
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a =sc.nextInt(); int b =sc.nextInt(); int c =sc.nextInt(); if(a==b==c){ System.out.println("1"); }else if((a==b && b!=c) || (b==c && b!=a)){ System.out.println("2"); }else{ Syste...
Main.java:8: error: incomparable types: boolean and int if(a==b==c){ ^ 1 error
s018279454
p03962
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a =sc.nextInt(); int b =sc.nextInt(); int c =sc.nextInt(); if(a==b==c){ System.out.println("1"); }else if(a==b!=c || b==c!=a){ System.out.println("2"); }else{ System.out.println(...
Main.java:8: error: incomparable types: boolean and int if(a==b==c){ ^ Main.java:10: error: incomparable types: boolean and int }else if(a==b!=c || b==c!=a){ ^ Main.java:10: error: incomparable types: boolean and int }else if(a==b!=c || b==c!=a){ ^ 3 errors
s388085704
p03962
C++
#include<bits/stdc++.h>using namespace std;main(){long long n,t[1000],a[1000],j;cin>>n>>t[0]>>a[0];for(int i=1;i<n;i++){cin>>t[i]>>a[i];j=max((a[i-1]-1)/a[i],(t[i-1]-1)/t[i])+1;a[i]*=j;t[i]*=j;}cout<<a[n-1]+t[n-1]<<endl;}
a.cc:1:30: warning: extra tokens at end of #include directive 1 | #include<bits/stdc++.h>using namespace std;main(){long long n,t[1000],a[1000],j;cin>>n>>t[0]>>a[0];for(int i=1;i<n;i++){cin>>t[i]>>a[i];j=max((a[i-1]-1)/a[i],(t[i-1]-1)/t[i])+1;a[i]*=j;t[i]*=j;}cout<<a[n-1]+t[n-1]<<endl;} | ...
s969182933
p03962
C++
#include<bits/stdc++.h> using namespace std; int main(){ long long n,t[1000]={},a[1000]={}; cin>>n; for(int i=0;i<n;i++){ cin>>t[i]>>a[i]; if(i) long long j=1; if((a[i-1]-1)/a[i]>(t[i-1]-1)/t[i]) j+=(a[i-1]-1)/a[i]; else j+=(t[i-1]-1)/t[i]; a[i]*=j; t[i]*=j; } cout<<a[n-1]+t[n-1]<<endl; return ...
a.cc: In function 'int main()': a.cc:10:40: error: 'j' was not declared in this scope 10 | if((a[i-1]-1)/a[i]>(t[i-1]-1)/t[i]) j+=(a[i-1]-1)/a[i]; | ^ a.cc:11:9: error: 'j' was not declared in this scope 11 | else j+=(t[i-1]-1)/t[i]; | ^ a.cc:12:10:...
s169742601
p03962
C++
#include<bit/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a==b==c)cout<<1<<endl; else if(a!=b && b!=c)cout<<3<<endl; else cout<<2<<endl; return 0; }
a.cc:1:9: fatal error: bit/stdc++.h: No such file or directory 1 | #include<bit/stdc++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s261266528
p03962
C++
#include<bit/stdc++.h> int main(){ int a,b,c; cin>>a>>b>>c; if(a==b==c)cout<<1<<endl; else if(a!=b && b!=c)cout<<3<<endl; else cout<<2<<endl; return 0; }
a.cc:1:9: fatal error: bit/stdc++.h: No such file or directory 1 | #include<bit/stdc++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s308905062
p03962
Java
import java.util.HashSet; import java.util.Scanner; public class ABC046A { public static void main(String[] args){ Scanner scanner = new Scanner(System.in); HashSet<Integer> hs = new HashSet<Integer>(); hs.add(scanner.nextInt()); System.out.println(hs.size()); scanner.close(); } }
Main.java:4: error: class ABC046A is public, should be declared in a file named ABC046A.java public class ABC046A { ^ 1 error
s642140001
p03962
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i, j, k) for(int i = j; i < k; ++i) #define rep(i, j) FOR(i, 0, j) #define INF (1 << 30) int main() { int a[3]; rep(i, n) cin >> a[i]; sort(a, a + 3); if(a[0] == a[1] && a[0] == a[2]) cout << 3 << endl; else if(a[0] == a[1] || a[1] == a[2]) cout << 2 << ...
a.cc: In function 'int main()': a.cc:11:16: error: 'n' was not declared in this scope 11 | rep(i, n) cin >> a[i]; | ^ a.cc:5:41: note: in definition of macro 'FOR' 5 | #define FOR(i, j, k) for(int i = j; i < k; ++i) | ^ a.cc:11:9: note: i...
s638631587
p03962
C++
#include <iostream> using namespace std; int main(void) { int a[3]; cin >> a[0] >> a[1] >> a[2]; sort(a, a + 3); if(a[0] == a[1] && a[1] == a[2]) cout << 1 << endl; else if(a[0] == a[1] || a[1] == a[2] || a[2] == a[0]) cout << 2 << endl; else cout << 3 << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:5: error: 'sort' was not declared in this scope; did you mean 'short'? 11 | sort(a, a + 3); | ^~~~ | short
s462373577
p03962
C++
//#include "IntMod.h" //typedef IntMod<1000000007> MInt; //#include "Union_Find.h" #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <string> #include <vector> #include <utility> #include <algorithm> #include <functional> #include <cmath> #include <stack> #include <queue> #include <...
a.cc: In function 'int main()': a.cc:88:8: error: expected ';' before 'return' 88 | 2 return 0; | ^~~~~~~~~~~~~ | ;
s159902812
p03962
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(i=0; i<n; i++) #define out(x) cout<<(x)<<"\n" int main(){ int a,b,c,A; cin>>a>>b>>c; if(a==b && b==c){ A=1; } else if(a==b || b==c || c==a){ A=2; } else{ A=3; } out(A) }
a.cc: In function 'int main()': a.cc:19:1: error: expected ';' before '}' token 19 | } | ^
s191209951
p03962
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(i=0; i<n; i++) #define out(x) cont<<(x)<<"\n" int main(){ int a,b,c,A; cin>>a>>b>>c; if(a==b && b==c){ A=1; } else if(a==b || b==c || c==a){ A=2; } else{ A=3; } out(A) }
a.cc: In function 'int main()': a.cc:4:16: error: 'cont' was not declared in this scope; did you mean 'const'? 4 | #define out(x) cont<<(x)<<"\n" | ^~~~ a.cc:18:1: note: in expansion of macro 'out' 18 | out(A) | ^~~
s383051093
p03962
C++
#include <iostream> using namespace std; int main(){ int color[3]; int rel=1; for(int i=0;i<3;i++) cin>>color[i]; for(int i=1;i<3;i++){ bool flag=true; for(int j=0;j<3;j++){ if(i!=j&&color[i]==color[j]) flag=false; } if(flag&&1<=color[i]&&color[j]<=100) rel++; } cout<<rel<<endl; ...
a.cc: In function 'int main()': a.cc:15:33: error: 'j' was not declared in this scope 15 | if(flag&&1<=color[i]&&color[j]<=100) rel++; | ^
s947021104
p03962
C++
#include <iostream> #include <stdio.h> using namespace std; int main(){ int i;input[3],count=0; for(i=0;i<3;i++){ cin>>input[i]; } for(i=0;i<2;i++){ if(input[i]==input[i+1]){ count++; } } if(input[0]==input[3]){ count++; } cout<<count<<endl; return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'input' was not declared in this scope; did you mean 'int'? 5 | int i;input[3],count=0; | ^~~~~ | int a.cc:5:18: error: 'count' was not declared in this scope 5 | int i;input[3],count=0; | ^~~~~
s183598119
p03962
C
#include <stdio.h> int main(void) { int a, b, c; scan("%d%d%d", &a, &b, &c); if (a == b) { if (b == c) { printf("1\n"); } else { printf("2\n"); } } else if (a == c) { printf("2\n"); } else if (b == c) { printf("2\n"); } else { printf("3\n"); } return 0; }
main.c: In function 'main': main.c:5:9: error: implicit declaration of function 'scan'; did you mean 'scanf'? [-Wimplicit-function-declaration] 5 | scan("%d%d%d", &a, &b, &c); | ^~~~ | scanf
s231228161
p03962
C++
import sys abc = sys.stdin.readline().split() abc_uniq = [] for x in abc: if x not in abc_uniq: abc_uniq.append(x) print len(abc_uniq)
a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s521800540
p03962
C++
s = raw_input() abc = s.split() abc_uniq = [] for x in abc: if x not in abc_uniq: abc_uniq.append(x) print len(abc_uniq)
a.cc:1:1: error: 's' does not name a type 1 | s = raw_input() | ^
s939117044
p03962
C++
#include <stdio.h> #include <iostream> #include <pair> #include <algorithm> #include <cmath> #include <map> int main(){ bool num[100]; int input,count=0; for(int i=0; i<100;i++){ num[i]=false; } while(cin >> input){ if(!num[input-1]){ num[input-1]=true; count++; } } cout << count ...
a.cc:3:10: fatal error: pair: No such file or directory 3 | #include <pair> | ^~~~~~ compilation terminated.
s936925426
p03962
C
#include<stdio.h> int main(){ int a,b,c,r; scanf("%d %d %d",&a,&b,&c); if(a==b){ if(b==c) r=1; else r=2; else if(b==c){ r=2; if(a==c) r=2; else r=3; } else if(a==c) r=2; else r=3; } printf("%d",r); }
main.c: In function 'main': main.c:10:2: error: expected '}' before 'else' 10 | else if(b==c){ | ^~~~ main.c: At top level: main.c:18:8: error: expected declaration specifiers or '...' before string constant 18 | printf("%d",r); | ^~~~ main.c:18:13: error: unknown type name 'r' 18 | printf...
s264453260
p03962
C
#include<stdio.h> int main(){ int a,b,c,r; scanf("%d %d %d",a,b,c); if(a==b){ if(b==c) r=1; else r=2; else if(b==c){ r=2; if(a==c) r=2; else r=3; } else if(a==c) r=2; else r=3; } printf("%d",r); }
main.c: In function 'main': main.c:10:2: error: expected '}' before 'else' 10 | else if(b==c){ | ^~~~ main.c: At top level: main.c:18:8: error: expected declaration specifiers or '...' before string constant 18 | printf("%d",r); | ^~~~ main.c:18:13: error: unknown type name 'r' 18 | printf...
s206593577
p03962
C++
#include <iostream> int main(void){ int a, b, c, cnt; std::cin >> a >> b >> c; if(a == b && b == c) cnt = 1; else if(a == b && b != c) cnt = 2; else if(c == b && a != c) cnt = 2; else if(a == c && b != a) cnt = 2; else cnt = 3; std::cout << cnt << std:endl; return 0; }
a.cc: In function 'int main()': a.cc:13:28: error: found ':' in nested-name-specifier, expected '::' 13 | std::cout << cnt << std:endl; | ^ | ::
s850131768
p03962
C++
#include"stdc++.h" using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if (a == b && b == c) { cout << 1 << endl; } else if (a == b || b == c || c==a) { cout << 2 << endl; } else { cout << 3 << endl; } }
a.cc:1:9: fatal error: stdc++.h: No such file or directory 1 | #include"stdc++.h" | ^~~~~~~~~~ compilation terminated.
s116622298
p03962
C++
#include <cstdio> #include <algorithm> #include <iostream> #include <vector> using namespace std; int main(void){ int i,j,k,t,tmp; string s; int a,b,c; cin>>a>>b>>c; if(a==b&&b==c) cout<<1; else if((a==b&&b!=c)||(b==c&&c!=a)||(a==c&&c!=b)) cout<<2; else cout<<3; cout<<endl return 0; }
a.cc: In function 'int main()': a.cc:20:13: error: expected ';' before 'return' 20 | cout<<endl | ^ | ; 21 | return 0; | ~~~~~~
s338985145
p03962
C++
#include<cstdio> using namespace std; int a,b,c; int d = 2; int main(){ scanf_s("%d %d %d\n",&a,&b,&c); if(a==b && a==c && b==c)d=1; if(a!=b && a!=c && b!=c)d=3; printf_s("%d\n",d); return 0; }
a.cc: In function 'int main()': a.cc:7:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 7 | scanf_s("%d %d %d\n",&a,&b,&c); | ^~~~~~~ | scanf a.cc:10:9: error: 'printf_s' was not declared in this scope; did you mean 'printf'? 10 | printf_s("%d\...
s520141614
p03962
C++
// #include <iostream> #include <cstdio> #include <string> #include <cmath> #include <algorithm> #include <vector> #include <map> #include <set> #include <array> #include <numeric> #include <functional> #include<list> #include<queue> #include<deque> #include<algorithm> #include<utility> #include<complex> using namespa...
a.cc:29:16: error: 'INT_MAX' was not declared in this scope 29 | const ll inf = INT_MAX; | ^~~~~~~ a.cc:19:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 18 | #include<complex> +++ |+#include <climits> 19 |
s297731455
p03962
Java
import java.util.Scanner; public class ProbD { public static void main(String[] args) { int a,b,c; Scanner foo = new Scanner(System.in); a = new Integer(foo.next()).intValue(); b = new Integer(foo.next()).intValue(); c = new Integer(foo.next()).intValue(); if (a == b && b == c) { System.out.println("1...
Main.java:4: error: class ProbD is public, should be declared in a file named ProbD.java public class ProbD { ^ Main.java:8: warning: [removal] Integer(String) in Integer has been deprecated and marked for removal a = new Integer(foo.next()).intValue(); ^ Main.java:9: warning: [removal] Integer(String) i...
s781183252
p03962
C++
#include <iostream> int main() { int a,b,c; int n = 6; std::cin >> a >> b >> c; a==b: (n--) ? ; a==c: (n--) ? ; b==c: (n--) ? ; (a==b && a==c && b==c): (n++) ? ; cout << n << "¥n"; return 0; }
a.cc: In function 'int main()': a.cc:7:13: error: expected ';' before ':' token 7 | a==b: (n--) ? ; | ^ | ; a.cc:8:13: error: expected ';' before ':' token 8 | a==c: (n--) ? ; | ^ | ; a.cc:9:13: error: expected ';' before ':...
s413636999
p03962
C++
#include <iostream> int main() { int a,b,c; int n = 6; std::cin >> a >> b >> c; a==b: (n--) ? ; a==c: (n--) ? ; b==c: (n--) ? ; (a==b && a==c && b==c): (n++) ? ; cout << n << "¥n"; return 0; }
a.cc: In function 'int main()': a.cc:7:13: error: expected ';' before ':' token 7 | a==b: (n--) ? ; | ^ | ; a.cc:8:13: error: expected ';' before ':' token 8 | a==c: (n--) ? ; | ^ | ; a.cc:9:13: error: expected ';' before ':...
s212616310
p03962
C
#include<stdio.h> int main(){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a==b && b==c){ printf("1¥n"); } else if(a==b || b==c || a==c){ printf("2¥n") } else{ printf("3¥n") } return 0; }
main.c: In function 'main': main.c:9:18: error: expected ';' before '}' token 9 | printf("2¥n") | ^ | ; 10 | } else{ | ~ main.c:11:18: error: expected ';' before '}' token 11 | printf("3¥n") | ^ | ...
s823977637
p03962
Java
import java.util.*; 2.import java.lang.*; 3.import java.io.*; 4. 5.class Main 6.{ 7. public static void main (String[] args) throws java.lang.Exception 8. { 9. BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); 10. String s = br.readLine(); 11. String[] str = s.split("\\s+"); 12. int[] col =...
Main.java:2: error: class, interface, enum, or record expected 2.import java.lang.*; ^ Main.java:3: error: class, interface, enum, or record expected 3.import java.io.*; ^ Main.java:4: error: class, interface, enum, or record expected 4. ^ Main.java:5: error: '{' expected 5.class Main ^ Main.java:7: error:...
s047881173
p03962
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class Main { private static Scanner sc; public static void main(String[] args) { sc = new Scanner(); this.solve...
Main.java:36: error: class Scanner is public, should be declared in a file named Scanner.java public class Scanner { ^ Main.java:15: error: non-static variable this cannot be referenced from a static context this.solve(); ^ Main.java:49: warning: [removal] finalize() in Object has been deprecated...
s732101380
p03962
C++
#include <iostream> using namespace std; int main(void){ int a,b,c; cin >> a >> b >> c; cin .ignore(); if(a==b && b==c) cout << 1 << endl; else if(a==b || b==c || a==c) cout << 2 << end; else cout << 3 << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:49: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 8 | else if(a==b || b==c || a==c) cout << 2 << end; | ~~~~~~~~~~^~~~~~ In file included from /usr...
s162146175
p03962
Java
import java.io.*; import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner scan = new Scanner(System.in); String a = scan.next(); String b =scan.next(); String c = scan.next(); if ((a == b && b == c)&&(a==c)) { System.out....
Main.java:21: error: reached end of file while parsing } ^ 1 error
s913651432
p03962
C++
#include <iostream> #include<vector> #include<string> #include<array> #include<algorithm> #include<list> #include<cmath> #include<iomanip> #include<queue> #include<functional> #include<climits> #include<iterator> #include<unordered_set> #include<unordered_map> #include<map> #include<set> #include<typeinfo> #include<c...
a.cc: In function 'int main()': a.cc:37:29: error: expected primary-expression before ')' token 37 | for(int i=1;i<N;i++)) { | ^
s823882768
p03962
C++
#include<vector> #include<string> #include<array> #include<algorithm> #include<list> #include<cmath> #include<iomanip> #include<queue> #include<functional> #include<climits> #include<iterator> #include<unordered_set> #include<unordered_map> #include<map> #include<set> #include<typeinfo> #include<chrono> #include<init...
a.cc: In function 'int main()': a.cc:32:29: error: expected primary-expression before ')' token 32 | for(int i=1;i<N;i++)) { | ^
s566048311
p03962
C++
#include<vector> #include<string> #include<array> #include<algorithm> #include<list> #include<cmath> #include<iomanip> #include<queue> #include<functional> #include<climits> #include<iterator> #include<unordered_set> #include<unordered_map> #include<map> #include<set> #include<typeinfo> #include<chrono> #include<init...
a.cc: In function 'int main()': a.cc:32:29: error: expected primary-expression before ')' token 32 | for(int i=1;i<N;i++)) { | ^
s889366241
p03962
C++
#include<vector> #include<string> #include<array> #include<algorithm> #include<list> #include<cmath> #include<iomanip> #include<queue> #include<functional> #include<climits> #include<iterator> #include<unordered_set> #include<unordered_map> #include<map> #include<set> #include<typeinfo> #include<chrono> #include<init...
a.cc: In function 'int main()': a.cc:30:12: error: redeclaration of 'int A' 30 | int A=K; | ^ a.cc:26:17: note: 'int A' previously declared here 26 | int N,K,A; | ^ a.cc:32:31: error: expected primary-expression before ')' token 32 | for(int i=1;i++...
s786655093
p03962
C++
#include <iostream> using namespace std; int main() { int N,K,A; cin >> N >> K ; A=K; for(int i=1;i++;i<N-1)) { A=A*(K-1); } cout<<A; return 0; }
a.cc: In function 'int main()': a.cc:11:31: error: expected primary-expression before ')' token 11 | for(int i=1;i++;i<N-1)) { | ^
s540628214
p03962
Java
import java.util.HashSet; import java.util.Scanner; /** * Created by Taichi1 on 10/22/16. */ public class Main2 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); HashSet<Integer> set = new HashSet<>(); while (sc.hasNext()) { set.add(sc.nextInt()); } System.out.println(set...
Main.java:15: error: ')' or ',' expected System.out.println(set.size(); ^ 1 error
s484940435
p03962
C++
#include<stdio.h> int main() { //declare the variables// int a, b, c; //scan the numbers of the colors// printf("Please tell me the 3 numbers of the colors.\n"); scanf_s("%d %d %d", &a, &b, &c); //judge weather or not same numbersare included// if (a == b) { if (a == c) { printf("1\n"); } else if (a ...
a.cc: In function 'int main()': a.cc:9:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 9 | scanf_s("%d %d %d", &a, &b, &c); | ^~~~~~~ | scanf
s220053137
p03962
Java
public class Main { public static void main(String args[]) { HashSet<String> hs = new HashSet<String>(); Scanner sc = new Scanner(System.in); for (int i = 0; i < 3; i++) { hs.add(sc.next()); } System.out.println(hs.size()); } }
Main.java:4: error: cannot find symbol HashSet<String> hs = new HashSet<String>(); ^ symbol: class HashSet location: class Main Main.java:4: error: cannot find symbol HashSet<String> hs = new HashSet<String>(); ^ symbol: class HashSet location: class ...
s356050055
p03962
C++
line = input() elems = line.split() penkis = {int(e) for e in elems} print(len(penkis))
a.cc:1:1: error: 'line' does not name a type 1 | line = input() | ^~~~ a.cc:4:6: error: expected constructor, destructor, or type conversion before '(' token 4 | print(len(penkis)) | ^
s249964085
p03962
C
#include<stdio.h> int main(void){ int a,b,c; int ans; scanf("%d %d %d",&a,&b,&c); if(a==b && b==c){ ans=1; }else if(a==b %% b!=c){ ans=2; }else if(a!=b && b==c){ ans=2; }else if(a!=b && b!=c && a==c){ ans=2; }else{ ans=3; } printf("%d\n",ans); return 0; }
main.c: In function 'main': main.c:10:18: error: expected expression before '%' token 10 | }else if(a==b %% b!=c){ | ^
s241810170
p03962
Java
import java.util.HashSet; import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner scan = new Scanner(System.in); HashSet<Integer> a = new HashSet<>(); for (int i = 0; i < 3; i++){ a.add(scan.nextInt()); } System.out.println(a...
Main.java:4: error: class ???? is public, should be declared in a file named ????.java public class ???? { ^ 1 error
s726167378
p03962
Java
import java.util.HashSet; import java.util.Scanner; public class A { public static void main(String[] args){ Scanner scan = new Scanner(System.in); HashSet<Integer> a = new HashSet<>(); for (int i = 0; i < 3; i++){ a.add(scan.nextInt()); } System.out.println(a.si...
Main.java:4: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s060967035
p03962
C++
#include <iostream> #include <algorithm> #include <vector> #define ll long long using namesace std; int main(){ ll n,k; cin >> n >> k; ll ans = k; for(ll i = 0; i < n -1; i++){ ans *= (k-1) } cout << ans << '\n'; return 0; }
a.cc:6:7: error: expected nested-name-specifier before 'namesace' 6 | using namesace std; | ^~~~~~~~ a.cc: In function 'int main()': a.cc:10:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 10 | cin >> n >> k; | ^~~ | std::cin In file includ...
s068792360
p03962
C++
#include <iostream> #include <set> #define REP(i,n) for(int i=0;i<(n);i++) using namespace std; int main(){int n;cin>>n;set<int> a;REP(i,n){cin>>a[i];}}
a.cc: In function 'int main()': a.cc:6:51: error: no match for 'operator[]' (operand types are 'std::set<int>' and 'int') 6 | int main(){int n;cin>>n;set<int> a;REP(i,n){cin>>a[i];}} | ^
s595091323
p03962
C++
#include <iostream> #include <set> #define REP(i,n) for(int i=0;i<(n);i++) using namespace std; int main(){int n;cin>>n;set<int> a(n);REP(i,n){cin>>a[i];}}
a.cc: In function 'int main()': a.cc:6:37: error: no matching function for call to 'std::set<int>::set(int&)' 6 | int main(){int n;cin>>n;set<int> a(n);REP(i,n){cin>>a[i];}} | ^ In file included from /usr/include/c++/14/set:63, from a.cc:2: /usr/include/c++...
s965108295
p03962
C++
#include <iostream> #include <set> #define REP(i,n) for(int i=0;i<(n);i++) using namespace std; int main(){int n;cin>>n;set<int> a(n)REP(i,n){cin>>a[i];}}
a.cc: In function 'int main()': a.cc:6:37: error: no matching function for call to 'std::set<int>::set(int&)' 6 | int main(){int n;cin>>n;set<int> a(n)REP(i,n){cin>>a[i];}} | ^ In file included from /usr/include/c++/14/set:63, from a.cc:2: /usr/include/c++/...
s990113113
p03962
C++
#include<map> #include<set> #include<list> #include<cmath> #include<queue> #include<stack> #include<cstdio> #include<string> #include<vector> #include<complex> #include<cstdlib> #include<cstring> #include<climits> #include<numeric> #include<sstream> #include<iostream> #include<algorithm> #include<functional> #define M...
a.cc: In function 'int main()': a.cc:51:16: error: expected ')' before ';' token 51 | REP(i,3;){ | ^ a.cc:23:33: note: in definition of macro 'REP' 23 | #define REP(i,n) for(int i=0;i<(n);i++) | ^ a.cc:23:32: note: to match this '(' 23 | #defin...
s728612643
p03962
C
#include<stdio.h> int main(){ int n,k; scanf("%d %d",&n,&k); int answer=k; for(int i=0;i<k;i++){ answer*=(k-1); } printf("%d",answer) return 0; }
main.c: In function 'main': main.c:9:20: error: expected ';' before 'return' 9 | printf("%d",answer) | ^ | ; 10 | return 0; | ~~~~~~
s603104308
p03962
C
#include<stdio.h> int main(){ int n,k; scanf("%d %d",&n,&k); int answer=k; for(i=0;i<k;i++){ answer*=(k-1); } return 0; }
main.c: In function 'main': main.c:6:5: error: 'i' undeclared (first use in this function) 6 | for(i=0;i<k;i++){ | ^ main.c:6:5: note: each undeclared identifier is reported only once for each function it appears in
s705995246
p03962
C
#include<stdio.h> int main(){ int n,k; scanf("%d %d",&n,&k); int answer=k; for(i=0,i<k,i++){ answer*=(k-1); } return 0; }
main.c: In function 'main': main.c:6:5: error: 'i' undeclared (first use in this function) 6 | for(i=0,i<k,i++){ | ^ main.c:6:5: note: each undeclared identifier is reported only once for each function it appears in main.c:6:16: error: expected ';' before ')' token 6 | for(i=0,i<k,i++){ | ...
s480458401
p03962
C
#include<stdio.h> #include<math.h> int main(){ double N,K; scanf("%lf %lf",&N,&K); if(N%2==0.0){ int a=N/2; double c=pow(K,a)*pow(K-1,a); printf("%f",c); } else{ int a=N/2+1; double c=pow(K,a)*pow(K-1,a-1); printf("%f",c); } return 0; }
main.c: In function 'main': main.c:7:5: error: invalid operands to binary % (have 'double' and 'int') 7 | if(N%2==0.0){ | ^
s264542101
p03962
C
#include<stdio.h> #include<math.h> int main(){ double N,K; scanf("%f %f",&N,&K); if(N%2==0){ int a=N/2; double c=pow(K,a)*pow(K-1,a); printf("%f",c); } else{ int a=N/2+1; double c=pow(K,a)*pow(K-1,a-1); printf("%f",c); } return 0; }
main.c: In function 'main': main.c:7:5: error: invalid operands to binary % (have 'double' and 'int') 7 | if(N%2==0){ | ^
s690837403
p03962
Java
import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.NoSuchElementException; public class A { public static void main(String[] args) { FS r = new FS(); int a = r.nextInt(); int b = r.nextInt(); int c = r.nextInt(); int count = 1; if(a != b) count++; if(a !...
Main.java:6: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s773796843
p03962
C++
a = [] for i in range(3): a.append(input()) s = set(a) print(len(s))
a.cc:1:1: error: 'a' does not name a type 1 | a = [] | ^
s327848547
p03962
Java
import java.lang.Math; import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner stdId[] = new Scanner(System.in); int n = stdId.nextInt(); System.out.println(); }
Main.java:9: error: reached end of file while parsing } ^ 1 error
s456986734
p03962
C++
#include <nits/stdc++.h> using namespace std; int main() { set<int> s; for (int i = 0; i < 3; ++i) { int t; cin >> t; s.insert(t); } cout << s.size() << endl; }
a.cc:1:10: fatal error: nits/stdc++.h: No such file or directory 1 | #include <nits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s725798696
p03962
C++
#include<Bits/stdc++.h> using namespace std; int main() { int x,i; set<int>s; for(i=0;i<3;i++) { cin>>x; s.insert(x); } cout<<s.size()<<endl; return 0; }
a.cc:1:9: fatal error: Bits/stdc++.h: No such file or directory 1 | #include<Bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s514133305
p03962
C
#include <stdio.h> int main(){ int a,b,c,count=1; scanf("%d %d %d", &a, &b, &c); if(a==b){ if(b==c){ if (a==c){ count=1; }else{ count=2; } }else{ if(b==c){ count=2; }else{ if(a==c){ count=2; }else{ count=3; } } } printf("%d\n", count); return 0; }
main.c: In function 'main': main.c:27:1: error: expected declaration or statement at end of input 27 | } | ^
s280547013
p03962
C
#include <stdio.h> int main(){ int a,b,c,count=1; scanf("%d %d %d", &a, &b, &c); if(a==b){ if(b==c){ if (a==c){ count=1; }else{ count=2; } }else{ if(b==c){ count=2; }else{ if(a==c){ count=2; }else{ count=3; } } printf("%d\n", count); return 0; }
main.c: In function 'main': main.c:26:1: error: expected declaration or statement at end of input 26 | } | ^ main.c:26:1: error: expected declaration or statement at end of input
s358265632
p03962
C++
#include<iostream> using namespace std; int main(void){ int p[3],c=3; for(int i=0;i<3;i++){ cin>>p[i]; for(int j=i-1;j>=0;j--){ if(p[j]==p[i])c--; } } cout<<c<<endl; return 0; } return 0; }
a.cc:17:2: error: expected unqualified-id before 'return' 17 | return 0; | ^~~~~~ a.cc:18:1: error: expected declaration before '}' token 18 | } | ^
s934082262
p03962
C++
#include <iostream> #include <set> using namespace std; int main(){ set<int> s; for(int i = 0, t; i < 3; i++) cin >> t; s.insert(t); cout << s.size() << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:24: error: 't' was not declared in this scope 8 | cin >> t; s.insert(t); | ^
s936450885
p03962
C++
for(int i = 0, t ; i < 3 ; i++ ) cin>>t, s.insert(t); cout<<s.size()<<endl; return 0; }
a.cc:2:5: error: expected unqualified-id before 'for' 2 | for(int i = 0, t ; i < 3 ; i++ ) | ^~~ a.cc:2:24: error: 'i' does not name a type 2 | for(int i = 0, t ; i < 3 ; i++ ) | ^ a.cc:2:32: error: 'i' does not name a type 2 | for(int i = 0, t ; i < 3 ; i+...
s926487349
p03962
C++
#include <iostream> #include <fstream> #include <cstdio> #include <cmath> #include <vector> #include <cstring> #include <string> #include <set> #include <map> #include <stack> #include <queue> #include <algorithm> using namespace std; #define REP(i,n) for(int i=0; i<n; ++i) #define FOR(i,a,b) for(int i=a; i<=b; ++i) #...
a.cc: In function 'int main()': a.cc:30:11: error: 'n' was not declared in this scope 30 | REP(i,n){ | ^ a.cc:15:33: note: in definition of macro 'REP' 15 | #define REP(i,n) for(int i=0; i<n; ++i) | ^
s235389069
p03962
C++
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] line = br.readLine().split(" "); int a = Integer.parseInt(line[0]...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.BufferedReader; | ^~~~~~ 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 java.io.InputStreamReader; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available wit...
s727931406
p03962
C++
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZER...
a.cc: In function 'void solve()': a.cc:17:20: error: 'z' was not declared in this scope 17 | cin>>x>>y>>z; | ^
s632494699
p03962
C++
using System; using System.Collections.Generic; using System.Linq; namespace ABC046 { class Q3 { static void Main() { int N = int.Parse(Console.ReadLine()); List<List<int>> datas = Enumerable.Range(1, N).Select(x => Console.ReadLine().Split(' ').Select(y => int.Parse(y)).ToList()).ToList(); int a = data...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.L...
s564968293
p03962
C++
using System; using System.Collections.Generic; using System.Linq; namespace ABC046 { class Q3 { static void Main() { int N = int.Parse(Console.ReadLine()); List<List<int>> datas = Enumerable.Range(1, N).Select(x => Console.ReadLine().Split(' ').Select(y => int.Parse(y)).ToList()).ToList(); int a = data...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.L...
s680377983
p03962
C++
#include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <set> #include <iostream> #include <string> #include <vector> #include <algorithm> #include <sstream> #include <complex> #include <stack> #include <queue> #include <cstdio> #include <cstring> #include <iterator> #include <b...
a.cc: In function 'void mainmain()': a.cc:104:15: error: 'a' was not declared in this scope 104 | cout<<a.size()<<endl; | ^
s677721835
p03962
C
#include <stdio.h> int main(void) { int a,b,c,nr; printf("print paint color types\n"); scanf("%d %d %d",&a,&b,&c); if(a==c||c==a) { if(a==b||b==a) { nr=1; } else { nr=2; } } else if(a==b||b==a) { if(a==c||c==a) { nr=1; } else { nr=2; } } else if(b==c||c==b) { if(a==b||...
main.c:47:1: error: stray '\' in program 47 | \n | ^ main.c:47:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
s989962796
p03962
C++
sum = 0 input = list(map(int,input().split())) if input[0] != input[1]: sum +=1 if input[0] != input[2]: sum +=1 if input[1] != input[2]: sum +=1 print(sum)
a.cc:1:1: error: 'sum' does not name a type 1 | sum = 0 | ^~~
s784756736
p03962
C++
#include<stdio.h> int main(viud){ int a,b,c; scanf("%d%d%d",&a,&b,&c); if(a==b || b==c || c==a){ printf("2"); } else if(a==b && b==c && c==a){ printf("1"); } else{ printf("3"); } return 0; }
a.cc:3:5: error: cannot declare '::main' to be a global variable 3 | int main(viud){ | ^~~~ a.cc:3:10: error: 'viud' was not declared in this scope 3 | int main(viud){ | ^~~~
s421754326
p03962
C
#include <stdio.h> int main(void) { int a, b, c; scant("%d %d %d\n", &a, &b, &c); int count = 3; if(a == b) count--; if(b == c) count--; if(a == c) count--; if(count == 0) count++; return 0; }
main.c: In function 'main': main.c:5:5: error: implicit declaration of function 'scant'; did you mean 'scanf'? [-Wimplicit-function-declaration] 5 | scant("%d %d %d\n", &a, &b, &c); | ^~~~~ | scanf
s829771894
p03962
C
#include <stdio.h> int main(void) { int a, b, c; scant("%d %d %d\n", &a, &b, &c); int count = 3; if(a == b) count--; if(b == c) count--; if(a == c) count--; if(count == 0) count++; return 0; }
main.c: In function 'main': main.c:5:5: error: implicit declaration of function 'scant'; did you mean 'scanf'? [-Wimplicit-function-declaration] 5 | scant("%d %d %d\n", &a, &b, &c); | ^~~~~ | scanf
s411591752
p03962
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int k=sc.nextInt(); long ans=Math.pow(k-1,n-1); System.out.println(ans*k); } }
Main.java:7: error: incompatible types: possible lossy conversion from double to long long ans=Math.pow(k-1,n-1); ^ 1 error
s915454024
p03962
C
#include<stdio.h> #include <string.h> #include <stdlib.h> int main() { int a; int b; int c; int cnt; // 個数のの入力 scanf("%d %d %d",&a,&b,&c); if(a == b) { if (a == c ) { cnt = 1; } else { cnt = 2; } } ...
main.c: In function 'main': main.c:30:11: error: implicit declaration of function 'elseif' [-Wimplicit-function-declaration] 30 | elseif (b == c) { | ^~~~~~ main.c:30:27: error: expected ';' before '{' token 30 | elseif (b == c) { | ^~ | ...
s955657202
p03962
C++
#include <stdio.h> int coler[3]; int answer = 3; int main(){ scanf_s("%d %d %d", &(coler[0]), &(coler[1]), &(coler[2])); if (coler[0] == coler[1]){ answer -= 1; } if (coler[1] == coler[2]){ answer -= 1; } if (coler[0] == coler[3]){ answer -= 1; } if (coler[0] == coler[1] && coler[1] == coler[2]){ answ...
a.cc: In function 'int main()': a.cc:7:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 7 | scanf_s("%d %d %d", &(coler[0]), &(coler[1]), &(coler[2])); | ^~~~~~~ | scanf
s670166179
p03962
Java
import java.util.Arrays; import java.util.Scanner; public Main A { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ int a[] = new int[3]; Scanner sc = new Scanner(System.in); a[0] = sc.nextInt(); a[1] = sc.nextInt(); a[2] = sc.nextInt(); sc.close(); Arrays.sort(a); if(a[0]==a[1] &&...
Main.java:5: error: class, interface, enum, or record expected public Main A { ^ Main.java:7: 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) Main.java:21: error: class, interfa...
s545689276
p03962
C++
#include <iostream> #include <set> #include <algorithm> int main() { std::unordered_set<int> penkis; for (int i = 0; i < n; i++) { int v; std::cin >> v; penkis.insert(v); } std::cout << penkis.size() << std::endl; }
a.cc: In function 'int main()': a.cc:6:14: error: 'unordered_set' is not a member of 'std' 6 | std::unordered_set<int> penkis; | ^~~~~~~~~~~~~ a.cc:4:1: note: 'std::unordered_set' is defined in header '<unordered_set>'; this is probably fixable by adding '#include <unordered_set>' 3 |...
s844076283
p03962
C
#include <stdlib.h> int main() { int a; int b; int c; // 個数のの入力 scanf("%d %d %d",&a,&b,&c); if(a == b) { if (a == c ) { printf("%d\n",1); } else { printf("%d\n",2); } } else { if (...
main.c: In function 'main': main.c:11:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 11 | scanf("%d %d %d",&a,&b,&c); | ^~~~~ main.c:2:1: note: include '<stdio.h>' or provide a declaration of 'scanf' 1 | #include <stdlib.h> +++ |+#include <stdio.h> ...
s165207272
p03962
C++
#include <iostream> using namespace std; int main(void){ int a,b,c,s=0; int[101] arr={}; cin >> a >> b >> c; arr[a]=1; arr[b]=1; arr[c]=1; for(int i=0;i<101;i++){ s+=arr[i]; } cout << s; return 0; }
a.cc: In function 'int main()': a.cc:6:13: error: expected identifier before numeric constant 6 | int[101] arr={}; | ^~~ a.cc:6:13: error: expected ']' before numeric constant 6 | int[101] arr={}; | ^~~ | ] a.cc:6:12: error: structured bindin...
s411358869
p03962
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int a=sc.nextInt(); int b=sc.nextInt(); int c=sc.nextInt(); if(a==b$$b==c&&c==a){ System.out.println(1); ...
Main.java:8: error: cannot find symbol if(a==b$$b==c&&c==a){ ^ symbol: variable b$$b location: class Main 1 error