submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s538140889
p03962
C++
#include <bits/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<<3<<endl;} else {cout<<2<<endl;} } //表
a.cc: In function 'int main()': a.cc:9:8: error: expected '(' before '!' token 9 | else if!(a==b||b==C||c==a){cout<<3<<endl;} | ^ | ( a.cc:10:1: error: 'else' without a previous 'if' 10 | else {cout<<2<<endl;} | ^~~~
s212643055
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin >> a >> b >> c; if(a=b&&b=c){cout<<1<<endl;} }
a.cc: In function 'int main()': a.cc:8:7: error: lvalue required as left operand of assignment 8 | if(a=b&&b=c){cout<<1<<endl;} | ~^~~
s872554503
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin >> a >> b >> c; if(a=b&&b=c){cout<<1<<endl;} if!(a=b||b=c||c=a){cout<<3<<endl;} cout << 2<<endl; }
a.cc: In function 'int main()': a.cc:8:7: error: lvalue required as left operand of assignment 8 | if(a=b&&b=c){cout<<1<<endl;} | ~^~~ a.cc:9:3: error: expected '(' before '!' token 9 | if!(a=b||b=c||c=a){cout<<3<<endl;} | ^ | (
s379054820
p03962
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll INF = 1e16; const ll mod = 1000000007; #define rep(i, n) for (int i = 0; i < (ll)(n); i++) int main() { vector <ll> v(3); rep(i, 3) cin >> v.at(i); sort(v.begin(), v.end()) ll res = 1; rep(i, 2) { if (v.at(i) != v....
a.cc: In function 'int main()': a.cc:11:29: error: expected ';' before 'll' 11 | sort(v.begin(), v.end()) | ^ | ; 12 | ll res = 1; | ~~ a.cc:14:35: error: 'res' was not declared in this scope; did you mean...
s935335362
p03962
C++
#include <iostream> #include <set> using namespace std; int main () { set<int> s; for (int i=0;i<3;i++) { int a; cin >> a; s.insert(a); } cout << s.count() << endl; }
a.cc: In function 'int main()': a.cc:13:18: error: no matching function for call to 'std::set<int>::count()' 13 | cout << s.count() << endl; | ~~~~~~~^~ In file included from /usr/include/c++/14/set:63, from a.cc:2: /usr/include/c++/14/bits/stl_set.h:756:9: note: candidate: 'templa...
s000084028
p03962
C++
#include <bits/stdc++.h> 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){ cout << 1 << endl; } else{ cout << 2 << endl; } }
a.cc: In function 'int main()': a.cc:6:9: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 6 | cin << a << b << c; | ~~~ ^~ ~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:6:9: note...
s601790294
p03962
C++
/* Author : tarang */ #include<bits/stdc++.h> #define ll long long #define fastio ios_base::sync_with(false); cin.tie(0);cout.tie(0); const int MOD = 1000000007; #define PI = acos(-1) using namespace std ; int main(){ set<int s ; int a , b , c; cin >> a >> b >> c ; s.insert(a); s.insert(b); s.insert(...
a.cc: In function 'int main()': a.cc:11:17: error: template argument 1 is invalid 11 | set<int s ; | ^ a.cc:11:17: error: template argument 2 is invalid a.cc:11:17: error: template argument 3 is invalid a.cc:14:4: error: 's' was not declared in this scope 14 | s.insert(a); |...
s128268583
p03962
C
#includde<stdio.h> int main(){ int a,b,c; scanf("%d%d%d",&a,&b,&c); if(a==b){ if(b==c){ printf("1\n"); }else{ printf("2\n"); } }else{ if(a==c||b==c){ printf("2\n"); }else{ printf("3\n"); } } return 0; }
main.c:1:2: error: invalid preprocessing directive #includde; did you mean #include? 1 | #includde<stdio.h> | ^~~~~~~~ | include main.c: In function 'main': main.c:5:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 5 | scanf("%d%d%d",&a,&b,&c); | ^~~~~...
s605126851
p03962
C
#include<stdio.h> int main(){ int arr[3]; int i; for(i=0;i<3;i++){ scanf("%d ",&arr[i]); } int j,flag=1;count=1; for(i=1;i<3;i++){ for(j=0;j<i;j++){ if(arr[i]==arr[j]){ flag=0; break; } } if(flag==1) count++; } printf("%d\n",count); return 0; }
main.c: In function 'main': main.c:8:16: error: 'count' undeclared (first use in this function) 8 | int j,flag=1;count=1; | ^~~~~ main.c:8:16: note: each undeclared identifier is reported only once for each function it appears in
s930151811
p03962
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0; i<n; i++) #define rep2(i,a,n) for(int i=(a); i<(n); i++) #define all(vec) vec.begin(),vec.end() using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using vll = vector<ll>; int main() { int a, b, c; cin a >> b >> c; if (a =...
a.cc: In function 'int main()': a.cc:11:19: error: expected ';' before 'a' 11 | int a, b, c; cin a >> b >> c; | ^~ | ;
s792273702
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int A[101]; for (int i=0 ; i<101 ;I++){ A[i]=0 ; } int a ,b , c ; cin >> a >> b >> c ; A[a] = 1; A[b] =1 ; A[c]=1; int count =0; for (int i=0 ; i<101 ;i++){ if ( A[i]==1){ count++; } } cout << count << endl; }
a.cc: In function 'int main()': a.cc:6:27: error: 'I' was not declared in this scope 6 | for (int i=0 ; i<101 ;I++){ | ^
s255453383
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int A[101]; for (int i=0 ; i<101 ;I++){ A[i]=0 ; } int a ,b , c ; cin >> a >> b >> c ; A[a] = 1; A[b] =1 ; A[c]=1; int count =0; for (int i=0 ; i<101 ;i++){ if ( A[i]==1){ count++ } } cout << count << endl; }
a.cc: In function 'int main()': a.cc:6:27: error: 'I' was not declared in this scope 6 | for (int i=0 ; i<101 ;I++){ | ^ a.cc:17:14: error: expected ';' before '}' token 17 | count++ | ^ | ; 18 | } | ~
s500262282
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int A[101]; for (int i=0 ; i<101 ;I++){ A[i]=0 ; } int a ,b , c ; cin >> a >> b >> c ; A[a] = 1; A[b] =1 ; A[c]=1; int count =0; for (int i=0 ; i<101 ;i++){ if ( A[i]==1){ count++ } cout << count << endl; }
a.cc: In function 'int main()': a.cc:6:27: error: 'I' was not declared in this scope 6 | for (int i=0 ; i<101 ;I++){ | ^ a.cc:17:14: error: expected ';' before '}' token 17 | count++ | ^ | ; 18 | } | ~ a.cc:...
s864673833
p03962
C
include <stdio.h> int main(void){ int a, b, c; scanf("%d %d %d",&a,&b,&c); if(a==b||a==c||b==c){ if(a==b&&b==c){ printf("1\n"); }else{ printf("2\n"); } }else{ printf("3\n"); } return 0; }
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s558207298
p03962
C
#include <stdio.h> int main(void){ 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 || b==c a!=b)printf("2\n"); else printf("3\n"); return 0; }
main.c: In function 'main': main.c:8:37: error: expected ')' before 'a' 8 | else if(a==b && b!=c || b==c a!=b)printf("2\n"); | ~ ^~ | )
s818452040
p03962
C++
#include <cstdio> int main() { int a,b,c; scanf("%d %d %d", &a, &b, &c); if (a == b and a == c) { printf("3") } else if (a == b or a == c or b == c) { printf("2") } else { printf("1") } }
a.cc: In function 'int main()': a.cc:9:20: error: expected ';' before '}' token 9 | printf("3") | ^ | ; 10 | } | ~ a.cc:14:20: error: expected ';' before '}' token 14 | printf("2") | ^ ...
s063561717
p03962
C++
#include <cstdio> int main() { int a,b,c; scanf("%d %d %d", &a, &b, &c); if (a == b and a == c) { printf("3") } else if (a == b or a == c or b == c) { printf("2") } }
a.cc: In function 'int main()': a.cc:9:20: error: expected ';' before '}' token 9 | printf("3") | ^ | ; 10 | } | ~ a.cc:14:20: error: expected ';' before '}' token 14 | printf("2") | ^ ...
s168495383
p03962
Java
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); String[] in = sc.nextString().split(" "); List<Integer> list = new ArrayList<>(); for(String s : in){ int i = Integer.parseInt(s); ...
Main.java:6: error: cannot find symbol String[] in = sc.nextString().split(" "); ^ symbol: method nextString() location: variable sc of type Scanner Main.java:13: error: cannot find symbol System.out.println(list.length()); ^ symbol: metho...
s342776713
p03962
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.println(Arrays.stream(scanner.nextLine().split(" ")).collect(Collectors.toSet()).size()); } }
Main.java:6: error: cannot find symbol System.out.println(Arrays.stream(scanner.nextLine().split(" ")).collect(Collectors.toSet()).size()); ^ symbol: variable Collectors location: class Main 1 error
s715884471
p03962
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); // 標準入力から整数a,b,cの数値を取得 int a = scanner.nextInt(); int b = scanner.nextInt(); int c = scanner.nextInt(); // 3つの数値を比較し、色が全てが同じ場合1を出力 if(a == b && a == c...
Main.java:24: error: reached end of file while parsing } ^ 1 error
s274182753
p03962
C++
#include<iostream> #include<string> #include<algorithm> #include<vector> #include<set> #include<iomanip> #define rep(i, a, n) for(int i = a; i < n; i++) using namespace std; int main(){ int a[3], c = 3; cin >> a[0]; rep(i, 1, 2){ cin >> a[i]; if(a[i] == a[i - 1]){ c--; } } if(c == 3){ ...
a.cc: In function 'int main()': a.cc:26:4: error: expected '}' at end of input 26 | } | ^ a.cc:9:11: note: to match this '{' 9 | int main(){ | ^
s449201019
p03962
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for (ll i = 0; i < (ll)(n); ++i) int main() { set<int> s; rep(i,3) { int a; cin >> a; s.insert(a); } cout << a.size() << endl; }
a.cc: In function 'int main()': a.cc:12:17: error: 'a' was not declared in this scope 12 | cout << a.size() << endl; | ^
s332574738
p03962
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for (ll i = 0; i < (ll)(n); ++i) int main() { set<int> s; rep(i,3) { int a; cin >> a; s.insert(a); } cout << s.seze() << endl; }
a.cc: In function 'int main()': a.cc:12:19: error: 'class std::set<int>' has no member named 'seze'; did you mean 'size'? 12 | cout << s.seze() << endl; | ^~~~ | size
s962789162
p03962
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for (ll i = 0; i < (ll)(n); ++i) int main() { set<int> s; rep(i,3) { int a; cin >> a; s.insert(a); } cout << a.seze() << endl; }
a.cc: In function 'int main()': a.cc:12:17: error: 'a' was not declared in this scope 12 | cout << a.seze() << endl; | ^
s913115644
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if (a == b && a == c) { cout << 1 << endl; } else if (a == b || b == c || a == c) { cout << 2 << endl; } else { cout << 3 endl; } }
a.cc: In function 'int main()': a.cc:14:14: error: expected ';' before 'endl' 14 | cout << 3 endl; | ^~~~~ | ;
s691468714
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if ((a == b) && (b == c)) cout << 1; else if ((a == b) || (b == c)) || (a == c)) cout << 2; else cout << 3; return 0; }
a.cc:8:36: error: extended character   is not valid in an identifier 8 | else if ((a == b) || (b == c)) || (a == c)) | ^ a.cc: In function 'int main()': a.cc:8:34: error: expected primary-expression before '||' token 8 | else if ((a == b) || (b == c)) || (a == c)) ...
s103573825
p03962
C++
#include <bits/stdc++.h> using namespace std; signed main(){ int a, b, c, ans = 0, i; scnaf("%d%d%d", &a, &b, &c); vector<int> count(101, 0); count[a] = 1; count[b] = 1; count[c] = 1; for(i = 0; i <= 100; i++){ ans += count[i]; } printf("%d\n", ans); return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'scnaf' was not declared in this scope; did you mean 'scanf'? 6 | scnaf("%d%d%d", &a, &b, &c); | ^~~~~ | scanf
s562224132
p03962
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i=0;i<(n);i++) using namespace std; using ll = long long; using P = pair<int,int>; int main() { vector<int> a(3); rep(i,3)cin >> a.at(i); sort(a.begin(),a.end()); int ans=3; rep(i,n-1){ if(a.at(i)==a.at(i+1))ans--; } cout << ans ...
a.cc: In function 'int main()': a.cc:13:11: error: 'n' was not declared in this scope 13 | rep(i,n-1){ | ^ a.cc:2:34: note: in definition of macro 'rep' 2 | #define rep(i,n) for (int i=0;i<(n);i++) | ^
s879354683
p03962
C++
#include<iostream> #include<vector> #include<algorithm> #include<iomanip> #include<string> #include<queue> #include<utility> #include<cmath> #include<sstream> #include<istream> #include<numeric> #include<stdlib.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int cnt = 0; if(a != b){ ...
a.cc: In function 'int main()': a.cc:33:6: error: 'ans' was not declared in this scope; did you mean 'abs'? 33 | if(ans == 0){ | ^~~ | abs
s575219192
p03962
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if (a=b && a!=c ){ cout<<2<<"\n"<<"Two different color: "<<a<<" , "<<c<<endl; } else if (b=c && a!=b ){ cout<<2<<"\n"<<"Two different colors: "<<a<<" , "<<b<<endl; } else if (b=c && a!=c ){ ...
a.cc:41:5: error: expected unqualified-id before 'return' 41 | return 0; | ^~~~~~ a.cc:42:1: error: expected declaration before '}' token 42 | } | ^
s554250697
p03962
C++
#include<bits/stdc++.h> using namespace std; int main() { vector<int> a; for (int i = 0; i < N; i++) { cin >> a.at(i); } sort(a.begin(), a.end()); a.erase(unique(a.begin(), a.end()), a.end()); cout << a.size(); return 0; }
a.cc: In function 'int main()': a.cc:6:25: error: 'N' was not declared in this scope 6 | for (int i = 0; i < N; i++) { | ^
s485243980
p03962
C++
#inlcude<bits/stdc++.h> using namespace std; int main() { set<int> s; int n = 3,num; while(n-- && cin >> num) { s.insert(num); } cout << s.size() << endl; return 0; }
a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include? 1 | #inlcude<bits/stdc++.h> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:6:3: error: 'set' was not declared in this scope 6 | set<int> s; | ^~~ a.cc:1:1: note: 'std::set' is defined in header '<...
s878696131
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)&&(c!=b))||((b==c)&&(c!=a))i)printf("2\n"); else printf("3\n"); return 0; }
main.c: In function 'main': main.c:10:62: error: expected ')' before 'i' 10 | else if(((a==b)&&(b==c))||((a==c)&&(c!=b))||((b==c)&&(c!=a))i)printf("2\n"); | ~ ^ | )
s844985552
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!=b)&&(a==c))||((a!=c)&&(b==c))i)printf("2\n"); else printf("3\n"); return 0; }
main.c: In function 'main': main.c:10:62: error: expected ')' before 'i' 10 | else if(((a==b)&&(b!=c))||((a!=b)&&(a==c))||((a!=c)&&(b==c))i)printf("2\n"); | ~ ^ | )
s697359269
p03962
C++
#include<bits/stdc++.h> using namespace std; int main() { int a[3],count=1; for(int i = 0;i<3;i++) { cin>>a[i]; } for(int i=0;i<2;i++) { if(a[i]!=a[i+1]) { count++; } } cout<<count<<endl; return 0;
a.cc: In function 'int main()': a.cc:20:12: error: expected '}' at end of input 20 | return 0; | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s429471233
p03962
C++
#include<bits//stdc++.h>> using namespace std; int main(){ set<int> st;int n; for(int i = 0; i <3;i++){ cin >> n;st.insert(n); }cout <<st.dize()<<endl; }
a.cc:1:25: warning: extra tokens at end of #include directive 1 | #include<bits//stdc++.h>> | ^ a.cc: In function 'int main()': a.cc:7:14: error: 'class std::set<int>' has no member named 'dize'; did you mean 'size'? 7 | }cout <<st.dize()<<endl; | ^~~~ | ...
s667194129
p03962
C++
#include<iostream> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; set<int> s; s.insert(a); s.insert(b); s.insert(c); cout<<s.size(); }
a.cc: In function 'int main()': a.cc:7:3: error: 'set' was not declared in this scope 7 | set<int> s; | ^~~ a.cc:2:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>' 1 | #include<iostream> +++ |+#include <set> 2 | using namespace std; a.cc:7:7: ...
s479038274
p03962
C++
#include <bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]) { int a,b,d; std::cin >> a>>b>>c; if (a==b || b==c || a==c){ cout << "2" << endl; } else if (a==b==c) { /* code */cout << "2" << endl; } else{ cout << "3" << endl; } return 0; }
a.cc: In function 'int main(int, const char**)': a.cc:6:21: error: 'c' was not declared in this scope 6 | std::cin >> a>>b>>c; | ^
s397810040
p03962
C
#include<stdio.h> int main(void) { int a,b,c; scanf("%d%d%d"&a,&b,&c); if((a==b)&&(a==c)) printf("1\n"); if((a==b)&&(a!=c)) printf("2\n"); if((a!=b)&&(a==c)) printf("2\n"); if((a!=b)&&(a!=c)) printf("3\n"); return 0; }
main.c: In function 'main': main.c:6:20: error: invalid operands to binary & (have 'char *' and 'int') 6 | scanf("%d%d%d"&a,&b,&c); | ~~~~~~~~^ | | | char *
s555201681
p03962
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(); // 整数の入力 int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); // 条件分岐と出力 if (a==b && a==c) { System.out.println(1); } else if (a==b) { System.out.printl...
Main.java:4: error: no suitable constructor found for Scanner(no arguments) Scanner sc = new Scanner(); ^ constructor Scanner.Scanner(Readable,Pattern) is not applicable (actual and formal argument lists differ in length) constructor Scanner.Scanner(Readable) is not applicable (...
s559052630
p03962
C++
#include <bits/stdc++.h> using namespace std; int main(){ set <int> S; int a, b, c; cin >> S.insert(a); cin >> S.insert(b); cin >> S.insert(c); cout << S.size() << endl; }
a.cc: In function 'int main()': a.cc:7:7: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::pair<std::_Rb_tree_const_iterator<int>, bool>') 7 | cin >> S.insert(a); | ~~~ ^~ ~~~~~~~~~~~ | | | | | std::pair...
s481091497
p03962
C++
#include <iostream> #include <string> using namespace std; int main{ int a , b , c; cin a >> b >> c; if(a == b == c){ cout << 1 << end1; else if(a == b || a == c){ cout << 2 << end1; else{ count << 3 << end1; } } //3 1 4 //3 3 33
a.cc:6:5: error: cannot declare '::main' to be a global variable 6 | int main{ | ^~~~ a.cc:7:9: error: expected primary-expression before 'int' 7 | int a , b , c; | ^~~ a.cc:7:9: error: expected '}' before 'int' a.cc:6:9: note: to match this '{' 6 | int main{ | ...
s968249362
p03962
C
#include<stdio.h> int main(void) { int a,b,c; scanf("%d%d%d",&a,&b,&c); if(a = b = c)printf("1"); if(a =! b = c)printf("2"); if(a =! b =! c)printf("3"); return 0; }
main.c: In function 'main': main.c:8:13: error: lvalue required as left operand of assignment 8 | if(a =! b = c)printf("2"); | ^ main.c:9:13: error: lvalue required as left operand of assignment 9 | if(a =! b =! c)printf("3"); | ^
s531365022
p03962
C++
#include <bits/std++.h> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; if(a!=b && b!=c && a!=c){ cout << 3 << endl; } else if((a==b && b!=c) || (b==c && b!=a) || (a==c && b!=c)){ cout << 2 << endl; } else{ cout << 1 << endl; } }
a.cc:1:10: fatal error: bits/std++.h: No such file or directory 1 | #include <bits/std++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s560956208
p03962
C++
#include <bits/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 && a != c) || (a == c && a != b) || (b == c && b != a) ){ cout << 2 << endl; } else if { ...
a.cc: In function 'int main()': a.cc:21:12: error: expected '(' before '{' token 21 | else if { | ^ | (
s378730757
p03962
C++
#include <bits/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 && a != c) { cout << 3 << endl; } else { cout << 2 << endl; } }
a.cc: In function 'int main()': a.cc:8:17: error: 'B' was not declared in this scope 8 | if (a == b && B == c) { | ^
s375943594
p03962
C++
#include <bits/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 != c || a = c != b || b = c != a ){ cout << 2 << endl; } else { cout << 3 << endl; ...
a.cc: In function 'int main()': a.cc:15:39: error: lvalue required as left operand of assignment 15 | else if ( a = b != c || a = c != b || b = c != a ){ | ~~~~~~~^~~~
s333250555
p03962
C++
#include <bits/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 != c || a = c != b || b = c != a ){ cout << 2 << endl; } else { cout << 3 << endl; ...
a.cc: In function 'int main()': a.cc:15:39: error: lvalue required as left operand of assignment 15 | else if ( a = b != c || a = c != b || b = c != a ){ | ~~~~~~~^~~~
s236965360
p03962
C++
#include <bits/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 != c || a =c != b || b = c != a ){ cout << 2 << endl; } else { cout << 3 << endl; ...
a.cc: In function 'int main()': a.cc:15:38: error: lvalue required as left operand of assignment 15 | else if ( a = b != c || a =c != b || b = c != a ){ | ~~~~~~~^~~~
s241891182
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 || c==a) { System.out.println(2)...
Main.java:11: error: illegal start of type if(a==b && b==c) { ^ Main.java:11: error: <identifier> expected if(a==b && b==c) { ^ Main.java:11: error: <identifier> expected if(a==b && b==c) { ^ Main.java:11: error: <identifier> expected if(a==b && b==c) { ^ Main.java:11: error: <ide...
s537782048
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 || c==a) { System.out.println(2); ...
Main.java:5: error: ';' expected Scanner sc new Scanner(System.in); ^ Main.java:11: error: illegal start of type if(a==b && b==c) { ^ Main.java:11: error: <identifier> expected if(a==b && b==c) { ^ Main.java:11: error: <identifier> expected if(a==b && b==c) { ^ Main.java:11: err...
s275744829
p03962
C++
#include <iostream> #include <map> using namespace std; int main(){ map<int,num> s; int a; for(int i=0;i<3;i++){ cin>>a; s[a]=1; } cout<<s.size(); }
a.cc: In function 'int main()': a.cc:6:11: error: 'num' was not declared in this scope; did you mean 'enum'? 6 | map<int,num> s; | ^~~ | enum a.cc:6:14: error: template argument 2 is invalid 6 | map<int,num> s; | ^ a.cc:6:14: error: template argument 4 is i...
s676344410
p03962
C++
#include <bits/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||c==a){ cout << 2 << endl; } else if(a=!b&&b=!c&&c=!a){ cout << 3 << endl; } }
a.cc: In function 'int main()': a.cc:14:21: error: lvalue required as left operand of assignment 14 | else if(a=!b&&b=!c&&c=!a){ | ~~^~~
s231710536
p03962
C
#include<stdio.h> int main(void){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a==b && b==c && c==a){ printf("1"); }else if(a==b && b!=c &&c!=a){ printf("2"); }else if(a!=b && b!=c &&c==a){ printf("2"); }else if(a!=b && b==c &&c!=a){ printf("2"); }else{ printf("3"); }
main.c: In function 'main': main.c:15:3: error: expected declaration or statement at end of input 15 | } | ^
s410520999
p03962
C
#include<stdio.h> int main(void){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a==b && b==c && c==a){ printf("1"); }else if(a==b && b!=c &&c!=a){ printf("2"); }else if(a!=b && b!=c &&c==a){ printf("2"); }else if(a!=b && b==c &&c!=a){ printf("2"); }else{ printf("3"); }
main.c: In function 'main': main.c:15:3: error: expected declaration or statement at end of input 15 | } | ^
s421719959
p03962
C
/* AtCoder Problems in C #A - AtCoDeerくんとペンキ https://atcoder.jp/contests/abc046/tasks/abc046_a 提出コードの解答例 https://neguse-atama.hatenablog.com */ #include<stdio.h> int main(void){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a==b && b==c && c==a){ printf("1"); }else if(a==b && b!=c &&c!=a){ printf("2"); }e...
main.c: In function 'main': main.c:22:3: error: expected declaration or statement at end of input 22 | } | ^
s422345407
p03962
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if (a == b == c) cout << 3 << endl; else if (a == b != c || a == c != b || b == C != a) cout << 2 << endl; else cout << 1 << endl; }
a.cc: In function 'int main()': a.cc:8:47: error: 'C' was not declared in this scope 8 | else if (a == b != c || a == c != b || b == C != a) cout << 2 << endl; | ^
s497896957
p03962
Java
import java.util.Scanner; import java.util.HashSet; import java.lang.String; public class Main { public static void main (String[] arg) { Scanner sc = new Scanner(System.in); HashSet<Integer> colors = new HashSet<Integer>(); colors.add(sc.nextInt()); colors.add(sc.nextInt()); colors.add(sc.nex...
Main.java:17: error: reached end of file while parsing } ^ 1 error
s337900390
p03962
Java
import java.util.Scanner; import java.util.HashSet; import java.lang.String; public class Main { public static void main (String[] arg) { Scanner sc = new Scanner(System.in); HashSet<Integer> colors = new HashSet<Integer>(); colors.add(sc.nextInt()); colors.add(sc.nextInt()); colors.add(sc.nex...
Main.java:17: error: reached end of file while parsing } ^ 1 error
s935123552
p03962
Java
import java.util.Scanner; import java.util.HashSet; public class Main { public static void main (String[] arg) { Scanner sc = new Scanner(System.in); HashSet<Integer> colors = new HashSet<Integer>(3); colors.add(sc.nextInt()); colors.add(sc.nextInt()); colors.add(sc.nextInt()); sc.clos...
Main.java:16: error: reached end of file while parsing } ^ 1 error
s609746360
p03962
Java
import java.util.Scanner; import java.lang.String; public class Main { public static void main (String[] arg) { Scanner sc = new Scanner(System.in); int res = rockpaper(sc); sc.close(); System.out.println(res); } public static int rockpaper(Scanner sc) { String tcdSequence = sc.next();...
Main.java:34: error: missing return statement } ^ 1 error
s334397099
p03962
C++
#include <iostream>d #include <map> #include <algorithm> #include <vector> #include <iomanip> #include <sstream> #include <cmath> #include <math.h> #include <string> using namespace std; int main() { int a[3] , b = 1; cin >> a[0] >> a[1] >> a[2]; sort( a , a + 3 ); if ( a[0] != a[1] ) b++; ...
a.cc:1:10: fatal error: iostream>: No such file or directory 1 | #include <iostream>d | ^~~~~~~~~~~ compilation terminated.
s286068543
p03962
C++
#include <iostream>d #include <map> #include <algorithm> #include <vector> #include <iomanip> #include <sstream> #include <cmath> #include <math.h> #include <string> using namespace std; int main() { int a[3] , b = 1; cin >> a[0] >> a[1] >> a[2]; sort( a , a + 3 ); if ( a[0] != a[1] ) b++; ...
a.cc:1:10: fatal error: iostream>: No such file or directory 1 | #include <iostream>d | ^~~~~~~~~~~ compilation terminated.
s262627626
p03962
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef string str; typedef vector<ll> vel; typedef vector<str> ves; #define REP(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++) #define rep(i, b) REP(i, 0, b) int main() { ll a, b, c; cin >> a >> b >> c; ll count = 0; if (a != b) { ...
a.cc: In function 'int main()': a.cc:21:17: error: expected ';' before '}' token 21 | count ++ | ^ | ; 22 | } | ~
s209550241
p03962
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for (int i = 0; i < (int)(n); i++) int main( void ) { int a,b,c; cin >> a >> b >> c; int ans = 3; if ( a == b && b == c) else { if ( a == b) ans--; if ( a == c) ...
a.cc: In function 'int main()': a.cc:15:5: error: expected primary-expression before 'else' 15 | else | ^~~~
s964761569
p03962
C++
#include <bits/stdc++.h> using ll = long long; #define FOR(i, k, n) for(ll i = (k); i < (n); i++) #define FORe(i, k, n) for(ll i = (k); i <= (n); i++) #define FORr(i, k, n) for(ll i = (k)-1; i > (n); i--) #define FORre(i, k, n) for(ll i = (k)-1; i >= (n); i--) #define REP(i, n) FOR(i, 0, n) #define REPr(i, n) FORre(i, ...
a.cc: In function 'int main()': a.cc:24:22: error: expected primary-expression before '<<' token 24 | cout << mp.size(); << endl; | ^~
s776453953
p03962
C++
#include <iostream> using namespace std; int main() { int a,b,c,d; cin >> a >> b >> c; if (a!=b) d++; if (a!=c) d++; if (b!=c) d++; cout << d }
a.cc: In function 'int main()': a.cc:10:12: error: expected ';' before '}' token 10 | cout << d | ^ | ; 11 | } | ~
s787740671
p03962
C++
#include <bits/stdc++.h> using namespace std; int main(){ cin >> a >> b >> c; if (a=b && a!= c && b!=c ){ cout<<"2"<<endl; } else if (a=c && a!= b && c!=b ){ cout<<"2"<<endl; } else if (b=c && b!= a && c!=a ){ cout<<"2"<<endl; } else if (a!=b && b!= c && a!=c ){ cou...
a.cc: In function 'int main()': a.cc:4:10: error: 'a' was not declared in this scope 4 | cin >> a >> b >> c; | ^ a.cc:4:15: error: 'b' was not declared in this scope 4 | cin >> a >> b >> c; | ^ a.cc:4:20: error: 'c' was not declared in this scope 4 | cin >> a >> b >>...
s839019934
p03962
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int an[3];rep(i,3)cin>>an[i]; an.sort(an, an+3); int c=3; if (an[0]==an[1])c--; if (an[1]==an[2])c--; cout << c; }
a.cc: In function 'int main()': a.cc:8:6: error: request for member 'sort' in 'an', which is of non-class type 'int [3]' 8 | an.sort(an, an+3); | ^~~~
s029820033
p03962
Java
class Main { public static void main(String[] args)throws Exception{ InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(isr); int a = Integer.parseInt(br.readLine()); int b = Integer.parseInt(br.readLine()); int c = Integer.parseInt...
Main.java:3: error: cannot find symbol InputStreamReader isr = new InputStreamReader(System.in); ^ symbol: class InputStreamReader location: class Main Main.java:3: error: cannot find symbol InputStreamReader isr = new InputStreamReader(System.in); ^ s...
s321961568
p03962
C
#include<Stdio.h> int main(void){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a==b && b==c && c==a){ printf("1"); }else if(a==b && b!=c &&c!=a){ printf("2"); }else if(a!=b && b!=c &&c==a){ printf("2"); }else if(a!=b && b==c &&c!=a){ printf("2"); }else{ printf("3"); } printf("\n"); ...
main.c:1:9: fatal error: Stdio.h: No such file or directory 1 | #include<Stdio.h> | ^~~~~~~~~ compilation terminated.
s406933198
p03962
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) 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 << 3 << endl; }else{ cout << 2 << endl; } }
a.cc: In function 'int main()': a.cc:8:10: error: lvalue required as left operand of assignment 8 | if(a==b&&b=c){ | ~~~~^~~
s665513423
p03962
C++
#include<bits/stdc++.h> #deifne fast ios::sync_with_stdio(false), cin.tie(0); #define ll long long #define endl '\n' using namespace std; main() { fast; int a,b,c; cin>>a>>b>>c; set<int> s; s.insert(a); s.insert(b); s.insert(c); cout<<s.size()<<endl; }
a.cc:2:2: error: invalid preprocessing directive #deifne; did you mean #define? 2 | #deifne fast ios::sync_with_stdio(false), cin.tie(0); | ^~~~~~ | define a.cc:8:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 8 | main() | ^~~~ a.cc: In function 'int main()': ...
s819133758
p03962
C++
l=list(map(int,input().split())) tmp = [] count=0 for i in l: if not i in tmp: count+=1 tmp.append(i) print(count)
a.cc:1:1: error: 'l' does not name a type 1 | l=list(map(int,input().split())) | ^
s229881865
p03962
C++
#include<bits/stdc++.h> using namespace std; int main() { int i,a,b,c,count=0; cin>>a>>b>>c; if(a!=b) count++; if(b!=c) count++; if(c!=a) count++; if(a==b && b==c) count=1 cout<<count<<endl; return 0; }
a.cc: In function 'int main()': a.cc:14:16: error: expected ';' before 'cout' 14 | count=1 | ^ | ; 15 | cout<<count<<endl; | ~~~~
s631543865
p03962
C++
#include <bits/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: In function 'int main()': a.cc:9:18: error: expected primary-expression before ',' token 9 | else cout<<"3"<,endl; | ^
s078144972
p03962
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(0); cin.tie(0); int n; cin >> n; ll lastT = 1, lastA = 1; for (int i = 0; i < n; i++) { ll t, a; cin >> t >> a; ll factor=max(a/x,b/y); while(true){ if(factor * t >= lastT && perc...
a.cc: In function 'int main()': a.cc:19:33: error: 'x' was not declared in this scope 19 | ll factor=max(a/x,b/y); | ^ a.cc:19:35: error: 'b' was not declared in this scope 19 | ll factor=max(a/x,b/y); | ...
s488082835
p03962
C++
#include <bits/stdc++.h> using namespace std; int main(){ string a,b,c; cin>>a>>b>>c; if(a==b==c){ cout<<"1"<<endl; } else if(a==b||b==c||c==a){ cout<<"2"<<endl; } else{ cout<<"3"<<endl; } }
a.cc: In function 'int main()': a.cc:7:10: error: no match for 'operator==' (operand types are 'bool' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 7 | if(a==b==c){ | ~~~~^~~ | | | | bool std::string {aka std::__cxx11::basic_string<char>} In file included from /...
s005921725
p03962
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int(i) = 0;(i) < (n); (i)++) typedef long long ll; int main(){ int a,b,c,ans = 3; cin >> a >> b >> c; if(a == b == c){ cout << 1 << endl; }else if(a == b != c||a != c == b||a != b == c){ cout << 2 << endl; }else{ cout << 3 << e...
a.cc: In function 'int main()': a.cc:15:2: error: expected '}' at end of input 15 | } | ^ a.cc:6:12: note: to match this '{' 6 | int main(){ | ^
s363972539
p03962
Java
import java.util.HashMap; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); HashMap<Integer, Integer> hmap = new HashMap<Integer, Integer>(); hmap.put(sc.nextInt(), 1); hmap.put(sc.nextInt(), 1); hmap.put(sc.nextInt(), 1); System.out.println(hmap.size())...
Main.java:6: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:6: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s945665165
p03962
Java
import java.util.Scanner; 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 || a == c) { System.out.println(2); ...
Main.java:10: error: incomparable types: boolean and int if (a == b == c) { ^ 1 error
s986333551
p03962
C++
using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if( (a == b) && (a == c)) cout << 1; else if((a == b) || (b == c)) cout << 2; else cout << 3; return 0; }
a.cc: In function 'int main()': a.cc:8:3: error: 'cin' was not declared in this scope 8 | 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 | a.cc:10:5: error: 'cout' was not d...
s533040873
p03962
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; set<int> s; s.insert(a); s.insert(b); s,insert(c); cout<<s.size(); return 0; }
a.cc: In function 'int main()': a.cc:11:5: error: 'insert' was not declared in this scope; did you mean 'assert'? 11 | s,insert(c); | ^~~~~~ | assert
s883199263
p03962
C++
#include<bits.stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; set<int> s; s.insert(a); s.insert(b); s,insert(c); cout<<s.size(); return 0; }
a.cc:1:9: fatal error: bits.stdc++.h: No such file or directory 1 | #include<bits.stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s800154176
p03962
C++
#include <iostream> #include <vector> #include <map> #include <cmath> #include <algorithm> #define endl "\n" using namespace std; int main() { map <int, int> mp; cin >> a >> b >> c; mp[a] ++; mp[b] ++; mp[c] ++; cout << mp.size(); }
a.cc: In function 'int main()': a.cc:12:12: error: 'a' was not declared in this scope 12 | cin >> a >> b >> c; | ^ a.cc:12:17: error: 'b' was not declared in this scope 12 | cin >> a >> b >> c; | ^ a.cc:12:22: error: 'c' was not declared in this scope 12 | cin...
s163681347
p03962
C++
#include<bits/stdc++.h> using namespace std; int main (){ int a, b, c; cin >> a >> b >> c; if(a == b || b == c || a == c){ cout << 2 << endl; } else if(a == b == c){ cout << 1 << endl; } else(a != b != c){ cout << 3 << endl; } }
a.cc: In function 'int main()': a.cc:14:20: error: expected ';' before '{' token 14 | else(a != b != c){ | ^ | ;
s095287775
p03962
C++
#include<bits/stdc++.h> using namespace std; int main (){ int a, b, c; cin a >> b >> c; if(a == b || b == c || a == c){ cout << 2 << endl; } else if(a == b == c){ cout << 3 << endl; } else { cout << 1 << endl; } }
a.cc: In function 'int main()': a.cc:6:6: error: expected ';' before 'a' 6 | cin a >> b >> c; | ^~ | ;
s638749016
p03962
C++
#include<bita/stdc++.h> using namespace std; int main (){ int a, b, c; cin a >> b >> c; if(a == b || b == c || a == c){ cout << 2 << endl; } else if(a == b == c){ cout << 3 << endl; } else { cout << 1 << endl; } }
a.cc:1:9: fatal error: bita/stdc++.h: No such file or directory 1 | #include<bita/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s223498542
p03962
C
#include <iostream> using namespace std; int main() { int a , b , c ; cin >> a >> b >> c ; if ( (a==c && a != b ) || (a==b && a != c ) ) cout << "2"; else if ( a == b && b == c ) cout <<"1"; else //if (a!=b && a!=c && b != c ) cout <<"3"; return 0; }
main.c:1:11: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s761233144
p03962
C
#include <iostream> using namespace std; int main() { int a , b , c ; cin >> a >> b >> c ; if ( (a==c && a != b ) || (a==b && a != c ) ) cout << "2"; else if ( a == b && b == c ) cout <<"1"; else //if (a!=b && a!=c && b != c ) cout <<"3"; return 0; ...
main.c:2:17: fatal error: iostream: No such file or directory 2 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s299794929
p03962
C
int main() { int a , b , c ; cin >> a >> b >> c ; if ( (a==c && a != b ) || (a==b && a != c ) ) cout << "2"; else if ( a == b && b == c ) cout <<"1"; else //if (a!=b && a!=c && b != c ) cout <<"3"; return 0; }
main.c: In function 'main': main.c:4:4: error: 'cin' undeclared (first use in this function) 4 | cin >> a >> b >> c ; | ^~~ main.c:4:4: note: each undeclared identifier is reported only once for each function it appears in main.c:7:4: error: 'cout' undeclared (first use in this function) 7 | cout...
s870537972
p03962
C++
#include<iostram> using namespace std; int main(){ int a,b,c;cin>>a>>b>>c; if(a==b and b==c)cout<<1<<endl; else if(a!=b and b!=c and a!=c)cout<<3<<endl; else cout<<2<<endl; }
a.cc:1:9: fatal error: iostram: No such file or directory 1 | #include<iostram> | ^~~~~~~~~ compilation terminated.
s592311770
p03962
C++
using namespace std; int main() { int a , b , c; cin >> a >> b >> c; if (1<=a && a<=100 && 1<=b && b<=100 && 1<=c && c<=100 ) { if (a!=b && a!=c && b!=c) cout << 3; else if (a==b && a!=c && b!=c) cout << 2; else if (a!=b && a==c && b!=c) cout << 2; else if (a!=b ...
a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope 6 | 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:10:9:...
s742790265
p03962
C++
#include <iostream> using namespace std; int main() { int a , b , c; cin >> a >> b >> c; if (1<= a, b , c <=100) { if (a!=b && a!=c && b!=c) cout << 3; else if (a==b && a!=c && b!=c) cout << 2; else if (a!=b && a==c && b!=c) cout << 2; else if (a!=b && a!=c && b...
a.cc: In function 'int main()': a.cc:29:28: error: expected '}' at end of input 29 | cout <<"incorrect"; | ^ a.cc:6:1: note: to match this '{' 6 | { | ^
s302267149
p03962
C++
#include <iostream> using namespace std; int main() { int color_11 = (cin >> (color_11), color_11), color_2=(cin >> (color_2), color_2), color_3=(cin >> (color_3), color_3); if ((color_11 == color_2) || (color_11 == color_3) ){ cout << "1" ;} else if ((color_11 == color_2) || (color_11...
a.cc: In function 'int main()': a.cc:14:84: error: expected ';' before '{' token 14 | else if ((color_11 == color_2) || (color_11 == color_3) || (color_2 == color_3){ | ^ | ...
s942815140
p03962
C++
#include <iostream> using namespace std; int main() { int color_11 = (cin >> (color_11), color_11), color_2=(cin >> (color_2), color_2), color_3=(cin >> (color_3), color_3); if ((color_11 == color_2) || (color_11 == color_3) ){ cout << "1" ;} else if ((color_11 == color_2) || (color_11...
a.cc: In function 'int main()': a.cc:14:84: error: expected ';' before '{' token 14 | else if ((color_11 == color_2) || (color_11 == color_3) || (color_2 == color_3){ | ^ | ...
s695000600
p03962
C
#include<stdio.h> int main(void){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a==b&&b==c) printf("1"); else if(a==b||a==c||b==c) print("2"); else { printf("3"); } return 0; }
main.c: In function 'main': main.c:8:5: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration] 8 | print("2"); | ^~~~~ | printf
s713028912
p03962
C++
import java.util.Scanner; 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(); int count = 1; if (b != a) { count += 1; } if (c != a && c != b) { count += 1; ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ 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 { | ^~~~~~
s779353178
p03962
C
#include <stdio.h> int main(void) { int a, b, c, count; scanf("%d%d%d", &a, &b, &c); if((a == b && a == c) && b == c) { count = 1; } else if((a == b && a != c) { count = 2; } else if(a != b && a == c) { count = 2; } else { count = 3; } printf("%d", count); return 0; }
main.c: In function 'main': main.c:12:35: error: expected ')' before '{' token 12 | else if((a == b && a != c) { | ~ ^~ | ) main.c:23:1: error: expected expression before '}' token 23 | } | ^
s420262330
p03962
C
#include <stdio.h> int main(void) { int a, b, c, count; scanf("%d%d%d", &a, &b, &c); if((a == b && a == c) && b == c) { count = 1; } else if(a == b && a != c && ) { count = 2; } else if(a != b && a == c) { count = 2; } else if((a != b && a != c) && b != c) { count = 3; } printf("%d", count); re...
main.c: In function 'main': main.c:12:37: error: expected expression before ')' token 12 | else if(a == b && a != c && ) { | ^