submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s432301970
p03671
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i=1;i<=n;++i) #define YES cout<<"YES"<<endl #define NO cout<<"NO"<<endl using namespace std; int main(){ int a[3],max=0,sum=0; rep(i,3) cin >> a[i]; rep(i,3){ if (max<a[i]) max=a[i]; sum L= a[i]; } cout << sum-max << endl; return 0; }
a.cc: In function 'int main()': a.cc:12:8: error: expected ';' before 'L' 12 | sum L= a[i]; | ^~ | ;
s018120445
p03671
C++
#include <stdio.h> int main(){ int a,b,c; scanf("%d%d%d",&a&b&c); int est; if(a>b) est=a; else est=b; if(c>est) est=c; printf("%d",a+b+c-est); return 0; }
a.cc: In function 'int main()': a.cc:4:20: error: invalid operands of types 'int*' and 'int' to binary 'operator&' 4 | scanf("%d%d%d",&a&b&c); | ~~^~ | | | | | int | int*
s132915462
p03671
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 && a+b <= a+c)System.println(a+b); else if (b+c <= a+b && b+c <= a+c)System.println(b+c); else System.println(a+...
Main.java:8: error: cannot find symbol if(a+b <= b+c && a+b <= a+c)System.println(a+b); ^ symbol: method println(int) location: class System Main.java:9: error: cannot find symbol else if (b+c <= a+b && b+c <= a+c)System.println(b+c); ...
s255414786
p03671
C++
#include<algorithm> #include<vector> using namespace std; int main(){ vector<int> n(3); cin >> n[0] >> n[1] >> n[2]; sort(n.begin(),n.end()); cout << n[0] << endl; }
a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope 6 | cin >> n[0] >> n[1] >> n[2]; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include<vector> +++ |+#include <iostream> 3...
s996449334
p03671
C++
#include<iostream> #include<string> using namespace std; string s; int main(){ cin>>s; if(s.size()%2==1) s=s.substr(0,s.size()-1); while(s.size()){ if(s.substr(0,s.size()/2)==s.substr(s.size()/2,s.size()/2){ cout<<s.size()<<endl; return 0; } s=s.substr(0,s.size()-2); } return 0; }
a.cc: In function 'int main()': a.cc:11:59: error: expected ';' before '{' token 11 | if(s.substr(0,s.size()/2)==s.substr(s.size()/2,s.size()/2){ | ^ | ; a.cc:11:26: warning: ignoring retur...
s641563414
p03671
C++
#include<iostream> #include<algorithm> int main(){ int a,b,c; cin>>a>>b>>c; cout<<min(min(a+b,a+c),b+c)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>a>>b>>c; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to stand...
s845473433
p03671
C++
#include<iostream> #include<algorithm> int main(){ int a,b,c; cin>>a>>b>>c; cout<<min(min(a+b,a+c),b+c)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>a>>b>>c; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to stand...
s511507452
p03671
C++
#include<iostream> #include<algorithm> int main(){ int a,b,c; cin>>a>>b>>c; cout<<min(min(a+b,a+c),b+c)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>a>>b>>c; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to stand...
s507161867
p03671
C++
#include<iostream> #include<algorithm> using namespace std; int main() { int a,b,c; cin >> a >> b >>c; cout << a + b + c - max(a, b, c) << endl; }
In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s207471257
p03671
C++
#include <iostream> #include <algorithm> using namespace std; int main(void){ int a[3]; cin >> a[0] >> a[1] >> a[2]; sort(a, a+n); cout << a[0]+a[1] << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:13: error: 'n' was not declared in this scope 7 | sort(a, a+n); | ^
s821062341
p03671
C++
#include<bits/stdc++.h> const int INF = 1e9; const int MOD = 1e9+7; using LL = long long; const LL LINF = 1e18; using namespace std; #define COUT(v) cout<<(v)<<endl #define CIN(n) int(n);cin >> (n) #define SCIN(s) string(s);cin >> (s) #define YES(n) cout<<((n)? "YES" : "NO")<<endl #define Yes(n) cout<<((n)? "Yes" : "N...
a.cc: In function 'int main()': a.cc:30:26: error: expected '}' before ')' token 30 | COUT(max({a+b,a+c,b+c)); | ~ ^ a.cc:7:24: note: in definition of macro 'COUT' 7 | #define COUT(v) cout<<(v)<<endl | ^
s102493843
p03671
C++
#include <iostream> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; cout << a+b+c-max(a,b,c); }
In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s582748391
p03671
C++
#include <iostream> using namespace std; int main(){ int a[3],i,j=0; for(i=0;i<3;i++){ cin >> a[i]; j += a[i]; } cout << j-max(a); }
a.cc: In function 'int main()': a.cc:10:22: error: no matching function for call to 'max(int [3])' 10 | cout << j-max(a); | ~~~^~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/includ...
s581369066
p03671
C++
int main() { int a, b, c; cin >> a; cin >> b; cin >> c; if (a + b <= a + c) { if (a + b <= b + c) { cout << a + b << endl; } } else { if (a + c <= b + c) { cout << a + c << endl; } else { cout << b + c << endl; } } }
a.cc: In function 'int main()': a.cc:3:9: error: 'cin' was not declared in this scope 3 | cin >> a; | ^~~ a.cc:9:25: error: 'cout' was not declared in this scope 9 | cout << a + b << endl; | ^~~~ a.cc:9:42: error: 'endl' was not declare...
s956592233
p03671
C
#include <stdio.h> int main(){ int a,b,c; int p1,p2,p3,min; scanf("%d%d%d",&a,&b,&c); p1 = a+b; p2 = b+c; p3 = a+c; if(p1<=p2 && p1<=p3){ min = p1; } else if(p2<=p1 && p2<=p3){ min = p2; } else if(p3<=p1 && p3<==p2){ min = p3; } ...
main.c: In function 'main': main.c:19:27: error: expected expression before '=' token 19 | else if(p3<=p1 && p3<==p2){ | ^
s585114038
p03671
C
#include <stdio.h> int main(){ int a,b,c; int p1,p2,p3,min; scanf("%d%d%d",&a,&b,&c); p1 = a+b; p2 = b+c; p3 = a+c; if(p1<p2){ if(p1<p3){ min = p1; } elif(p3<p1){ min = p3; } } elif(p2<p1){ if(p2<p3){ ...
main.c: In function 'main': main.c:18:9: error: implicit declaration of function 'elif' [-Wimplicit-function-declaration] 18 | elif(p3<p1){ | ^~~~ main.c:18:20: error: expected ';' before '{' token 18 | elif(p3<p1){ | ^ | ; main.c:22:...
s993842736
p03671
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { int a,b,c; cin >> a >> b >> c; cout << min(a+b,a+c,b+c) << endl; return 0; }
In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s872880481
p03671
C++
#include<iostream> using namespace std; int a[200000], b[200000]; int main() { int n; cin >> n; if (n < =20000) { for (int i = 1; i <=n; i++) cin >> a[i]; for (int j = 1; j <=n; j++) { b[j] = a[j]; if (j > 1) { int temp; int m = (j + 1) / 2; if (j % 2) { for (int i = 0;; i++) ...
a.cc: In function 'int main()': a.cc:8:17: error: expected primary-expression before '=' token 8 | if (n < =20000) | ^
s739857742
p03671
C++
#include <bits/stdc++.h> #include<iostream> #include<cstdio> #include<vector> #include<queue> ...
a.cc: In function 'int main()': a.cc:49:33: error: expected ';' before ':' token 49 | cin>>a[0]>>a[1]>>a[2]: | ^ | ;
s812014416
p03671
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in =new Scanner(System.in); int a =in.nextInt(); int b =in.nextInt(); int c =in.nextInt(); int d =a+b; int e =a+c; int f =b+c; if(d>=e) { if(e>=f) { System.out.println(...
Main.java:34: error: reached end of file while parsing } ^ 1 error
s902432609
p03671
C++
#include <iostream> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; cout << min({a+b,b+c,c+a}) << endl; }
a.cc: In function 'int main()': a.cc:7:12: error: no matching function for call to 'min(<brace-enclosed initializer list>)' 7 | cout << min({a+b,b+c,c+a}) << endl; | ~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:...
s117269733
p03671
C
#include<stdio.h> main() { int a,b,c,d,e,f; printf("Input is given from Standard Input in the following format:\n"); scanf("%d%d%d",&a,&b,&c); d=a+b;e=a+c,f=b+c; if(1<=a&&a<10000&&b>=1&&b<=10000&&c>=1&&c<=10000) { if(b<c&&a<c) { printf("%d\n",d); printf("B...
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main() | ^~~~ main.c: In function 'main': main.c:37:13: error: expected expression at end of input 37 | if(a<=c&&b<=c) | ^~ main.c:37:13: error: expected declaration or statement at end of input main.c:37:13...
s985600607
p03671
C++
#include<iostream> #include<vector> using namespace std; int main(void) { vector<int> x(3); cin >> x[0] >> x[1] >> x[2]; sort(x.begin(), x.end()); cout << x[0] + x[1] << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:1: error: 'sort' was not declared in this scope; did you mean 'short'? 8 | sort(x.begin(), x.end()); | ^~~~ | short
s743559194
p03671
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int Max = a; if (b > Max) Max = b; if (c > Max) Max = c; cou << a + b + c - Max << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:5: error: 'cou' was not declared in this scope; did you mean 'cos'? 11 | cou << a + b + c - Max << endl; | ^~~ | cos
s889304070
p03671
C++
#include <cstdio> #include <algorithm> #include <iostream> #include <vector> #include <cmath> #include <string> #define pb push_back #define mod 1000000007 using namespace std; typedef long long int ll; int main(void){ int a,b,c; cin>>a>>b>>c; cout<<min(a+b,a+c,b+c)<<endl; return 0; }
In file included from /usr/include/c++/14/algorithm:60, from a.cc:2: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': a.cc:15:12: required from here 15 | cout<<min(a+b,a+c,b+c)<<endl; ...
s212035311
p03671
Java
import java.util.Scanner; import java.util.Stack; class Main { public static void main(String[] args) { new Main().compute(); } void compute() { Scanner sc = new Scanner(System.in); int[] a = new int[3]; for (int i = 0; i < 3; i++) { a[i] = sc.nextInt(); ...
Main.java:16: error: cannot find symbol Arrays.sort(a); ^ symbol: variable Arrays location: class Main 1 error
s852777958
p03671
C++
#include <iostream> #include <string> using namespace std; int main(void){ int a,b,c; cin>>a>>b>>c; if(a+b<=a+c){ cout<<a+b<<endl; break; }else if(a+c<=b+c){ cout<<a+c<<endl; break; }else if(b+c<=a+b){ cout<<b+c<<endl; break; } return 0; }
a.cc: In function 'int main()': a.cc:9:9: error: break statement not within loop or switch 9 | break; | ^~~~~ a.cc:12:9: error: break statement not within loop or switch 12 | break; | ^~~~~ a.cc:15:9: error: break statement not within loop or switch 15 | bre...
s909546669
p03671
C++
#include <iostream> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; if (a >> b && a >> c) cout << b + c << endl; else if (b >> a && b >> c) cout << a + b << endl; else cout << a + c << endl; return 0;
a.cc: In function 'int main()': a.cc:9:10: error: expected '}' at end of input 9 | return 0; | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s055699550
p03671
C++
#include <isotream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if (a > b) { int t = a; a = b; b = t; } if (b > c) { int t = b; b = c; c = t; } cout << a+b << endl; }
a.cc:1:10: fatal error: isotream: No such file or directory 1 | #include <isotream> | ^~~~~~~~~~ compilation terminated.
s944743605
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a, b, c, d; cin >> a >> b >> c; if( a > b ){ d = a; a = b; b = d; } if( b > c ){ d = b; b = c; c = d; } if( a > b ){ d = a; a = b; b = d; } cout << a + b << endl; return 0;
a.cc: In function 'int main()': a.cc:16:14: error: expected '}' at end of input 16 | return 0; | ^ a.cc:3:15: note: to match this '{' 3 | int main(){ | ^
s642509665
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; if( a > b ){ int d = a; a = b; b = d; } if( b > c ){ d = b; b = c; c = d; } if( a > b ){ d = a; a = b; b = d; } cout << a + b << endl; return 0;
a.cc: In function 'int main()': a.cc:10:1: error: 'd' was not declared in this scope 10 | d = b; b = c; c = d; | ^ a.cc:13:1: error: 'd' was not declared in this scope 13 | d = a; a = b; b = d; | ^ a.cc:16:10: error: expected '}' at end of input 16 | return 0; | ^ a.cc:3:11: note: to...
s275318258
p03671
C++
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String num = b...
a.cc:2:1: error: 'import' does not name a type 2 | import java.io.BufferedReader; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import java.io.InputStreamReader; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available wit...
s752799988
p03671
C++
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String num = b...
a.cc:2:1: error: 'import' does not name a type 2 | import java.io.BufferedReader; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import java.io.InputStreamReader; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available wit...
s271436748
p03671
C++
#include <iostream> #include<algorithm> #include<string> using namespace std; int n,a,b; int main (){ cin>>n>>a>>b;cout<<a+b+c-max(n,max(a,b))<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:24: error: 'c' was not declared in this scope 8 | cin>>n>>a>>b;cout<<a+b+c-max(n,max(a,b))<<endl; | ^
s656233716
p03671
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,n) FOR(i,0,n) int main(){ vector<int> data(3); REP(i,3){ cin>>data[i]; } sort(ALL(data)); cout<<data[0]+data[1]<<endl; return 0; }
a.cc: In function 'int main()': a.cc:13:10: error: 'ALL' was not declared in this scope 13 | sort(ALL(data)); | ^~~
s625633564
p03671
C++
#define _USE_MATH_DEFINES #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<string> #include<iostream> #include<cctype> #include<cstdio> #include<vector> #include<stack> #include<queue> #include <algorithm> #include<math.h> #include<set> #include<map> #include <sstream> #include<iomanip> #include <ctype.h> //...
a.cc: In function 'int main()': a.cc:26:13: error: expected '}' at end of input 26 | int main() { | ~^
s068907692
p03671
C++
#define _USE_MATH_DEFINES #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<string> #include<iostream> #include<cctype> #include<cstdio> #include<vector> #include<stack> #include<queue> #include <algorithm> #include<math.h> #include<set> #include<map> #include <sstream> #include<iomanip> #include <ctype.h> //...
a.cc: In function 'int main()': a.cc:26:13: error: expected '}' at end of input 26 | int main() { | ~^
s434326295
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c;cin>>a>>b>>c; vector<int>v; v.pb(a); v.pb(b); v.pb(c); sort(v.begin(),v.end()); cout<<v[0]+v[1]<<"\n"; return 0; }
a.cc: In function 'int main()': a.cc:6:7: error: 'class std::vector<int>' has no member named 'pb' 6 | v.pb(a); | ^~ a.cc:7:7: error: 'class std::vector<int>' has no member named 'pb' 7 | v.pb(b); | ^~ a.cc:8:7: error: 'class std::vector<int>' has no member named 'pb' 8 | ...
s615589849
p03671
C++
#include <stdio.h> int main(void) { int a, b, c; scanf("%d %d %d", &a, &b, &c); if(a <= b <= c) { printf("%d\n", a + b); } else if(a <= b >= c) { printf("%d\n", a + c); } else if(a >= b <= c && a <= c) { printf("%d\n", b + a); } else if(a >= b <= c %% a >= c) { printf("%d\n", a + c); } else if(a >= b >= c) { printf(...
a.cc: In function 'int main()': a.cc:15:24: error: expected primary-expression before '%' token 15 | } else if(a >= b <= c %% a >= c) { | ^ a.cc:18:22: error: expected ';' before '}' token 18 | printf("&d\n", c + b) | ^ | ; 19 |...
s013489815
p03671
C++
#include <stdio.h> int main(void) { int a, b, c; scanf("%d %d %d", &a, &b, &c); if(a <= b <= c) { printf("%d\n", a + b); } else if(a <= b >= c) { printf("%d\n", a + c); } else if(a >= b <= c && a <= c) { printf("%d\n", b + a); } else if(a >= b <= c %% a >= c) { printf("%d\n", a + c); } else if(a >= b >= c) { printf(...
a.cc: In function 'int main()': a.cc:15:24: error: expected primary-expression before '%' token 15 | } else if(a >= b <= c %% a >= c) { | ^ a.cc:18:22: error: expected ';' before '}' token 18 | printf("&d\n", c + b) | ^ | ; 19 |...
s106924566
p03671
C++
abc = list(map(int, input().split())) m =10**5 for i in range(2): m = min(m,abc[i]+abc[i+1]) print(m)
a.cc:1:1: error: 'abc' does not name a type 1 | abc = list(map(int, input().split())) | ^~~
s889983435
p03671
C++
#include<bits/stdc++.h> using namespace std;int main(){int a,b,c;cin>>a>>b>>c;cout<<a+b+c-max(a,max(b,c))<<endl;return 0;}
a.cc:1:25: warning: extra tokens at end of #include directive 1 | #include<bits/stdc++.h> using namespace std;int main(){int a,b,c;cin>>a>>b>>c;cout<<a+b+c-max(a,max(b,c))<<endl;return 0;} | ^~~~~ /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in funct...
s701176323
p03671
C++
#include<bits/stdc++.h>using namespace std;int main(){int a,b,c;cin>>a>>b>>c;cout<<a+b+c-max(a,max(b,c))<<endl;return 0;}
a.cc:1:30: warning: extra tokens at end of #include directive 1 | #include<bits/stdc++.h>using namespace std;int main(){int a,b,c;cin>>a>>b>>c;cout<<a+b+c-max(a,max(b,c))<<endl;return 0;} | ^~~~~~~~~ a.cc:1:9: fatal error: bits/stdc++.h>usin: No such file or directory 1 | #inc...
s154110567
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; cout<<a+b+c-max(a,max(b,c))<<endl; return0; }
a.cc: In function 'int main()': a.cc:7:1: error: 'return0' was not declared in this scope 7 | return0; | ^~~~~~~
s851304544
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; cout<<a+b+c-max(a,max(b,c))<<endl; return0; }
a.cc: In function 'int main()': a.cc:7:1: error: 'return0' was not declared in this scope 7 | return0; | ^~~~~~~
s023180207
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; cout<<a+b+c-max(a,max(b,c))<<endl; return0; }
a.cc: In function 'int main()': a.cc:7:1: error: 'return0' was not declared in this scope 7 | return0; | ^~~~~~~
s026826533
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; cout<<a+b+c-max(a,max(b,c))<<endl; return0; }
a.cc: In function 'int main()': a.cc:7:1: error: 'return0' was not declared in this scope 7 | return0; | ^~~~~~~
s388529299
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; cout<<a+b+c-max(a,max(b,c))<<endl; return0; }
a.cc: In function 'int main()': a.cc:7:1: error: 'return0' was not declared in this scope 7 | return0; | ^~~~~~~
s997296005
p03671
C++
#include <bits/stdc++.h> using namespace std;int main(){int a,b,c;cin>>a>>b>>c;cout<<a+b+c-max(a,max(b,c))<<endl;return0;}
a.cc: In function 'int main()': a.cc:2:89: error: 'return0' was not declared in this scope 2 | using namespace std;int main(){int a,b,c;cin>>a>>b>>c;cout<<a+b+c-max(a,max(b,c))<<endl;return0;} | ^~~~~~~
s024598210
p03671
C++
#include <bits/stdc++.h>using namespace std;int main(){int a,b,c;cin>>a>>b>>c;cout<<a+b+c-max(a,max(b,c))<<endl;return0;}
a.cc:1:31: warning: extra tokens at end of #include directive 1 | #include <bits/stdc++.h>using namespace std;int main(){int a,b,c;cin>>a>>b>>c;cout<<a+b+c-max(a,max(b,c))<<endl;return0;} | ^~~~~~~~~ a.cc:1:10: fatal error: bits/stdc++.h>usin: No such file or directory 1 | #i...
s351904091
p03671
C++
#include<bits/stdc++.h> using namespace std;int main(){int a,b,c;cin>>a>>b>>c;cout<<a+b+c-max(a,max(b,c))<<endl;return0;}
a.cc:1:25: warning: extra tokens at end of #include directive 1 | #include<bits/stdc++.h> using namespace std;int main(){int a,b,c;cin>>a>>b>>c;cout<<a+b+c-max(a,max(b,c))<<endl;return0;} | ^~~~~ /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in functi...
s391914389
p03671
C++
#include<bits/stdc++.h>using namespace std;int main(){int a,b,c;cin>>a>>b>>c;cout<<a+b+c-max(a,max(b,c))<<endl;return0;}
a.cc:1:30: warning: extra tokens at end of #include directive 1 | #include<bits/stdc++.h>using namespace std;int main(){int a,b,c;cin>>a>>b>>c;cout<<a+b+c-max(a,max(b,c))<<endl;return0;} | ^~~~~~~~~ a.cc:1:9: fatal error: bits/stdc++.h>usin: No such file or directory 1 | #incl...
s410160638
p03671
C++
#include<bits/stdc++.h>using namespace std; const int N = 3;int i;vector<int> afs;int main() {afs.resize(N);for(i = 0; i < N; i++) {cin >> afs[i];}sort(afs.begin(),afs.end());cout << afs[0] + afs[1] << endl;return 0;}
a.cc:1:30: warning: extra tokens at end of #include directive 1 | #include<bits/stdc++.h>using namespace std; const int N = 3;int i;vector<int> afs;int main() {afs.resize(N);for(i = 0; i < N; i++) {cin >> afs[i];}sort(afs.begin(),afs.end());cout << afs[0] + afs[1] << endl;return 0;} | ...
s509997616
p03671
C++
#!/usr/bin # -*- coding:"utf-8" -*- a, b, c = map(int, input().split()) if a <= b: if c <= b: x = a + c else: x = a + b else: if c <= a: x = b + c else: x = b + a print(x)
a.cc:1:2: error: invalid preprocessing directive #! 1 | #!/usr/bin | ^ a.cc:2:3: error: invalid preprocessing directive #- 2 | # -*- coding:"utf-8" -*- | ^ a.cc:4:1: error: 'a' does not name a type 4 | a, b, c = map(int, input().split()) | ^
s057419593
p03671
C++
include <stdlib.h> #include <iostream> #include <sstream> #include <queue> #define FOR(x, y, z) for(int x = 0; y; x++) #define rep(x, z, y) for(int x = (z); x < (y); x++) #define all(x) x.begin(),x.end() #define len(x) (sizeof(x) / sizeof(x[0])) #define sp_str(str, sp_word) istringstream stream(str); string res; while(...
a.cc:1:1: error: 'include' does not name a type 1 | include <stdlib.h> | ^~~~~~~ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, ...
s610002490
p03671
C
#include<bits/stdc++.h> using namespace std; int main() { unsigned long int ball_1, ball_2, ball_3, total_1, total_2, sum_1, sum_2, sum_3; scanf("%d%d%d", &ball_1, &ball_2, &ball_3); sum_1=ball_1+ball_2; sum_2=ball_1+ball_3; sum_3=ball_2+ball_3; total_1=(sum_1<=sum_2)?sum_1:sum_2; total_2...
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s227295238
p03671
C++
#include <iostream> #include <vector> #include <algorithm> #include <set> #include <stack> #include <iomanip> #include <queue> #include <deque> #include <sstream> #include <stdio.h> #include <string> #include <cmath> #include <map> #include <utility> using namespace std; #define s(n) scanf("%d",&n) #define sc(n) scanf...
a.cc: In function 'int main()': a.cc:30:31: error: expected ')' before ';' token 30 | cout << (a+b+c-max(max(a,b),c); | ~ ^ | )
s927732755
p03671
C
#include<stdio.h> int main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); // 出力 if((a+b)>(a+c) && (b+c)>(a+c)){ printf("%d\n",a+c); }else if((a+c)>(a+b) && (b+c)>(a+b)){ printf("%d\n",a+b); }else{ printf("%d\n",B+c); } return 0; }
main.c: In function 'main': main.c:13:19: error: 'B' undeclared (first use in this function) 13 | printf("%d\n",B+c); | ^ main.c:13:19: note: each undeclared identifier is reported only once for each function it appears in
s112951319
p03671
C
#include<stdio.h> #include<stdlib.h> int main(void){ int a; int b; int c; scanf("%d %d %d",&a, &b, &c); if(1<=a<=10000 && 1<=b<=10000 && 1<=c<=10000){ if((a+b)<=(b+c) && (a+b)<=(a+c)){ printf("%d",a+b); } else if { ((b+c)<=(a+b) && (b+c)<=(a+c)){ ...
main.c: In function 'main': main.c:13:19: error: expected '(' before '{' token 13 | } else if { | ^ | ( main.c:14:43: error: expected ';' before '{' token 14 | ((b+c)<=(a+b) && (b+c)<=(a+c)){ | ^ ...
s747286114
p03671
C++
#include <iostream> #include <fstream> #include <cstdio> #include <cassert> #include <complex> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <cstdlib> #include <cstring> #include <iomanip> #include <numeric> #include <sstream> #include <ctime> #include <cctype> #include <set> #inclu...
a.cc:37:1: error: extended character   is not valid in an identifier 37 |   | ^ a.cc:61:1: error: extended character   is not valid in an identifier 61 |   | ^ a.cc:37:1: error: '\U000000a0' does not name a type 37 |   | ^
s525398839
p03671
C
#include <stdio.h> int main(void){ int a, b, c, min; scanf("%d %d %d", &a, &b, &c); if(a < 1 || 10000 < a || b < 1 || 10000 < b || c < 1 || 10000 < c){ return 1; } min = 0; int min = a+b; if(a+c > min){ min = a+c; } if(b+c > min){ min = b+c; ...
main.c: In function 'main': main.c:15:8: error: redeclaration of 'min' with no linkage 15 | int min = a+b; | ^~~ main.c:5:17: note: previous declaration of 'min' with type 'int' 5 | int a, b, c, min; | ^~~
s319904534
p03671
C++
inp = [ a for int(a) in input().split()] inp.sort() return inp[0] + inp[1]
a.cc:1:1: error: 'inp' does not name a type; did you mean 'int'? 1 | inp = [ a for int(a) in input().split()] | ^~~ | int
s369330478
p03671
Java
import java.util.Scanner; import java.util.Random; import java.util.Arrays; class Main { public static void main(String[] args) { int a = new int[3]; for (int i = 0; i < 3; i++) { a[i] = sc.nextInt(); } Arrays.sort(a); System.out.println(a[0] + a[1]); ...
Main.java:9: error: incompatible types: int[] cannot be converted to int int a = new int[3]; ^ Main.java:11: error: array required, but int found a[i] = sc.nextInt(); ^ Main.java:11: error: cannot find symbol a[i] = sc.nextInt(); ^ symbol: variable sc locati...
s381347224
p03671
Java
import java.util.Scanner; import java.util.Random; import java.util.Arrays; class Main { public static void main(String[] args) { int a = new int[3]; for (int i = 0; i < 3; i++) { int a[i] = sc.nextInt(); } Arrays.sort(a); System.out.println(a[0] + a[1]); ...
Main.java:11: error: ']' expected int a[i] = sc.nextInt(); ^ Main.java:11: error: ';' expected int a[i] = sc.nextInt(); ^ 2 errors
s210133207
p03671
Java
package ans_20170701; 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 ans = 0; // 最安値の合計 if(a <= b){ ans = a; }else{ ans = b; } if(b ...
Main.java:29: error: ';' expected System.out.println(ans)); ^ 1 error
s480554615
p03671
C++
include <iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; cout<<min(a+b,min(b+c,a+c)); return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:6:9: error: 'cin' was not declared in this scope 6 | cin>>a>>b>>c; | ^~~ a.cc:7:9: error: 'cout' was not declared in this scope 7 | cout<<min(a+b,min(b+c,...
s764840689
p03671
C++
# include < stdio .h > int main () { int a, b, c; cin>>a>>b>>c; int max =a; if(b> max ) max =b; if(c> max ) max =c; cout<< a+b+c-max ; return 0; }
a.cc:1:11: fatal error: stdio .h : No such file or directory 1 | # include < stdio .h > | ^~~~~~~~~~~~ compilation terminated.
s435357438
p03671
C++
#include<bits/stdc++.h> using namespace std; int main(){ vector<int>v(3); for(int i=0; i<3:i++)cin>>v[i]; sort(v.begin(),v.end()); cout<<v[0]+v[1]<<endl; }
a.cc: In function 'int main()': a.cc:5:14: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions] 5 | for(int i=0; i<3:i++)cin>>v[i]; | ^ a.cc:5:17: error: expected ';' before ':' token 5 | for(int i=0; i<3:i++)cin>>v[i]; ...
s224787855
p03671
Java
import java.util.*; public class B4 { public static void main(String[]args){ Scanner stdIn = new Scanner(System.in); int n = stdIn.nextInt(); int [] a = new int [n]; for(int i=0;i<n;i++){ a[i] = stdIn.nextInt(); } int [] b = new int [n]; int [] c = new int [n]; for(int i=1;i<=n;i++){ b[i-1] = ...
Main.java:2: error: class B4 is public, should be declared in a file named B4.java public class B4 { ^ 1 error
s217452321
p03671
C
#include <stdio.h> int main(void) { int a[3]; int min =10000000; scanf("%d %d %d",&a[0],&a[1],&a[2]); for(int i=0;i<3;i++){ for(j=0;j<3;j++){ if(i!=j){ if(a[i]+a[j]<min){ min = a[i]+a[j]; } } } } printf("%d\n",min); }
main.c: In function 'main': main.c:9:21: error: 'j' undeclared (first use in this function) 9 | for(j=0;j<3;j++){ | ^ main.c:9:21: note: each undeclared identifier is reported only once for each function it appears in
s959727258
p03671
C++
#include <cstdio> #include <vector> #define _USE_MATH_DEFINES #include <math.h> #include <cstring> #include <numeric> #include <algorithm> #include <stdlib.h>> #include <functional> #include <string> #include <array> #include <map> #include <queue> #include <limits.h> #include <set> #include <stack> #include <random> #...
a.cc:8:20: warning: extra tokens at end of #include directive 8 | #include <stdlib.h>> | ^ a.cc:149:18: error: field 'l' has incomplete type 'SkewHeap<T>' 149 | SkewHeap l, r; | ^ a.cc:147:7: note: definition of 'class SkewHeap<T>' is not complete until the ...
s764444454
p03671
C
#include <stdio.h> int main(void){ int a, b, c; int min; scanf("%d%d%d", &a, &b, &c); if if(a<=b){ if(b<=c){ min = a + b; }else{min = a + c; } }else{if(a<=c){ min = b + a; }else{min = b + c; } } printf("minPrice = %d\n", min); return 0; }
main.c: In function 'main': main.c:8:4: error: expected '(' before 'if' 8 | if(a<=b){ | ^~ | (
s732656967
p03671
C++
#include<stdio,h> int main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a+b>=b+c){ if(b+c<=a+c){ printf("%d",b+c); }else{ printf("%d",a+c); } }else{ if(a+b>=a+c){ printf("%d",a+c); }else{ if(a+c>=b+c){ printf("%d",b+c); }else{ printf("%d",a+c); } } } return 0; }
a.cc:1:9: fatal error: stdio,h: No such file or directory 1 | #include<stdio,h> | ^~~~~~~~~ compilation terminated.
s060346358
p03671
Java
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int b = scan.nextInt(); int c = scan.nextInt(); scan.close(); int p = (a + b); int q = (a + c); int r = (b + c); if(p < q && p < r){ Sy...
Main.java:25: error: bad operand types for binary operator '&&' else if(r = p && r = q){ ^ first type: int second type: int Main.java:25: error: incompatible types: int cannot be converted to boolean else if(r = p && r = q){ ^ 2 errors
s738151598
p03671
Java
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int b = scan.nextInt(); int c = scan.nextInt(); scan.close(); int p = (a + b); int q = (a + c); int r = (b + c); if(p < q && p < r){ Sy...
Main.java:29: error: class, interface, enum, or record expected } ^ 1 error
s700697598
p03671
C++
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int b = scan.nextInt(); int c = scan.nextInt(); scan.close(); int p = (a + b); int q = (a + c); int r = (b + c); if(p < q && p < r){ Sy...
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 { | ^~~~~~ a.cc:29:1: error: expected declaration before '}' token ...
s261510073
p03671
C++
#include <stdio.h> int main(void) { int a,b,c; int x,y,z; int min; scanf_s("%d", &a); scanf_s("%d", &b); scanf_s("%d", &...
a.cc: In function 'int main()': a.cc:9:20: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 9 | scanf_s("%d", &a); | ^~~~~~~ | scanf
s571644379
p03671
C++
#include <stdio.h> int main(void) { int a,b,c; int x,y,z; int min; scanf_s("%d", &a); scanf_s("%d", &b); scanf_s("%d", &...
a.cc: In function 'int main()': a.cc:9:20: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 9 | scanf_s("%d", &a); | ^~~~~~~ | scanf
s815892585
p03671
C++
#include <stdio.h> int main(void) { int a,b,c; int x,y,z; int min; scanf_s("%d", &a); scanf_s("%d", &b); scanf_s("%d", &c); x = a + b...
a.cc: In function 'int main()': a.cc:9:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 9 | scanf_s("%d", &a); | ^~~~~~~ | scanf
s938837017
p03671
C++
#include <stdio.h> int main(void) { int a,b,c; int x,y,z; int min; scanf_s("%d", &a); scanf_s("%d", &b); scanf_s("%d", &c); x = a + b; y = b + c; z = c + a; ...
a.cc: In function 'int main()': a.cc:9:12: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 9 | scanf_s("%d", &a); | ^~~~~~~ | scanf a.cc:30:10: error: expected '}' at end of input 30 | } | ^ a.cc:4:9: note: to match this '...
s867773998
p03671
C++
#include <stdio.h> int main(void) { int a,b,c; int x,y,z; int min; scanf_s("%d", &a); scanf_s("%d", &b); scanf_s("%d", &c); x = a + b; y = b + c; z = c + a; min = x; if(x>y){ min = y; if(...
a.cc: In function 'int main()': a.cc:9:8: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 9 | scanf_s("%d", &a); | ^~~~~~~ | scanf a.cc:30:6: error: expected '}' at end of input 30 | } | ^ a.cc:4:5: note: to match this '{' 4 | { ...
s112527594
p03671
C++
#include <stdio.h> int main(void) { int a,b,c; int x,y,z; int min; scanf("%d", &a); scanf("%d", &b); scanf("%d", &c); x = a + b; y = b + c; z = c + a; min = x; if(x>y){ min = y; if(y>z){ ...
a.cc: In function 'int main()': a.cc:30:6: error: expected '}' at end of input 30 | } | ^ a.cc:4:5: note: to match this '{' 4 | { | ^
s138797787
p03671
C++
#include <stdio.h> int main(void) { int a,b,c; int x,y,z; int min; scanf("%d", a); scanf("%d", b); scanf("%d", c); x = a + b; y = b + c; z = c + a; min = x; if(x>y){ min = y; if(y>z){ min=z; } else if(x>z){ min = z; } printf("%d\n", min); ret...
a.cc: In function 'int main()': a.cc:30:2: error: expected '}' at end of input 30 | } | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s464823079
p03671
C++
#include <stdio.h> int main(void) { int a,b,c; int x,y,z; int min; scanf("%d", a); scanf("%d", b); scanf("%d", c); x = a + b; y = b + c; z = c + a; min = x; if(x>y){ min = y; if(y>z){ min=z; } else if(x>z){ min = z; } printf("%d\n", min) retu...
a.cc: In function 'int main()': a.cc:27:23: error: expected ';' before 'return' 27 | printf("%d\n", min) | ^ | ; 28 | 29 | return 0; | ~~~~~~ a.cc:30:2: error: expected '}' at end of input 30 | } | ^ a.cc:4:1: note:...
s759586673
p03671
C++
#include <stdio.h> int main(void) { int a,b,c; int x,y,z; int min; scanf("%d", a); scanf("%d", b); scanf("%d", c); x = a + b; y = b + c; z = c + a; min = x; if(x>y){ min = y; if(y>z){ min=z; } else if(x>z){ min = z; } return 0; }
a.cc: In function 'int main()': a.cc:28:2: error: expected '}' at end of input 28 | } | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s822713647
p03671
C++
#include <stdio.h> int main(void) { int a,b,c; int x,y,z; int min; scanf_s("%d", a); scanf_s("%d", b); scanf_s("%d", c); x = a + b; y = b + c; Z = c + a; min = x; if(x>y){ min = y; if(y>z){ min=z; } else if(x>z){ min = z; } return 0; }
a.cc: In function 'int main()': a.cc:9:4: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 9 | scanf_s("%d", a); | ^~~~~~~ | scanf a.cc:15:4: error: 'Z' was not declared in this scope 15 | Z = c + a; | ^ a.cc:28:2: error: expected '}' at end of input 28 |...
s425782188
p03671
C++
#include <stdio.h> int main(void) { int a,b,c; int x,y,z; scanf_s("%d", a); scanf_s("%d", b); scanf_s("%d", c); x = a + b; y = b + c; Z = c + a; min = x; if(x>y){ min = y; if(y>z){ min=z; } else if(x>z){ min = z; } return 0; }
a.cc: In function 'int main()': a.cc:8:4: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 8 | scanf_s("%d", a); | ^~~~~~~ | scanf a.cc:14:4: error: 'Z' was not declared in this scope 14 | Z = c + a; | ^ a.cc:16:4: error: 'min' was not declared in this scope...
s139500568
p03671
C++
#include<iostream> using namespace std; int main() { const size_t NUM = 3; int values[NUM]; for (int i = 0; i < NUM; ++i) { cin >> values[i]; } int sum; int min = numeric_limits<int>::max(); for (int i = 0; i < NUM - 1; ++i) { for (int j = i + 1; j < NUM; ++j) { sum = values[i] + values[j]; if...
a.cc: In function 'int main()': a.cc:16:19: error: 'numeric_limits' was not declared in this scope 16 | int min = numeric_limits<int>::max(); | ^~~~~~~~~~~~~~ a.cc:16:34: error: expected primary-expression before 'int' 16 | int min = numeric_limits<int>::max(); | ...
s480756013
p03671
C
#include <stdio.h> int main(void){ int a; int b; int c; int d; int min; int min2; int goukei; scanf("%d%d%d",&a,&b,&c); if(1<a&&b&&c<10000){ d = (a + b + c)/3; if(a>d){ min = b; min2 = c; }else if(b>d){ min = a; min2 = c; }else if(c>d){ min = a; min2 = b; }else{ mi...
main.c:44:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input 44 | c | ^
s463570308
p03671
C++
#include <stdio.h> #include <stlib.h> int main(void){ int a,b,c; scanf("%d%d%d",&a,&b,&c); int n,m,k; n=a+b; m=a+c; k=b+c; int min = n; if(min>m){ min=m; printf("%d",min); }else if(min>k){ min=k; printf("%d",min); }else{ ...
a.cc:2:10: fatal error: stlib.h: No such file or directory 2 | #include <stlib.h> | ^~~~~~~~~ compilation terminated.
s028680977
p03671
C
#include <stdio.h> int main(void) { int n,j; scanf("%d", &n); int a[n]; j for (int i = 0; i < n; i++) { scanf("%d", &a[i]); j = 0; while (j =! i) { a[j] = a[i-j]; j++; } } for (int c = 0; c < n; c++) { printf("%d ",a[c]); } return 0 } }
main.c: In function 'main': main.c:7:2: error: expected ';' before 'for' 7 | j | ^ | ; 8 | for (int i = 0; i < n; i++) { | ~~~ main.c: At top level: main.c:29:1: error: expected identifier or '(' before '}' token 29 | } | ^
s533611368
p03671
C++
#include <stdio.h> int main(void){ int a,b,c,n; scanf("%d%d%d",&a,&b,&c); if(a<b && b<c){ n=a+b; printf("%d",n); }else if(a<b && c<b){ n=a+c; printf("%d",n); }else(b<a && b<c){ n=b+c; printf("%d",n); } }
a.cc: In function 'int main()': a.cc:13:24: error: expected ';' before '{' token 13 | }else(b<a && b<c){ | ^ | ;
s524628504
p03671
C++
#include <stdio.h> int main(void){ int a,b,c; sscanf("%d", &a); sscanf("%d", &b); sscanf("%d", &c); int max = a; if(max < b){ max = b; } if(max = c){ max = c; } printf("%d\n",a+b+c-max); return 0; }
a.cc: In function 'int main()': a.cc:5:18: error: cannot convert 'int*' to 'const char*' 5 | sscanf("%d", &a); | ^~ | | | int* In file included from a.cc:1: /usr/include/stdio.h:431:43: note: initializing argument 2 of 'int sscanf(const char...
s682775293
p03671
C++
#include <stdio.h> int main(void){ int a,b,c; sscanf("%d", &a); sscanf("%d", &b); sscanf("%d", &c); int max = a; if(max < b) max = b; if(max = c) max = c; printf("%d\n",a+b+c-max); return 0; }
a.cc: In function 'int main()': a.cc:5:18: error: cannot convert 'int*' to 'const char*' 5 | sscanf("%d", &a); | ^~ | | | int* In file included from a.cc:1: /usr/include/stdio.h:431:43: note: initializing argument 2 of 'int sscanf(const char...
s741960089
p03671
C++
#include <stdio.h> int main(void){ int a,b,c; sscanf(buf, "%d", &a); sscanf(buf, "%d", &b); sscanf(buf, "%d", &c); int max = a; if(max < b) max = b; if(max = c) max = c; printf("%d",a+b+c-max); return 0; }
a.cc: In function 'int main()': a.cc:5:12: error: 'buf' was not declared in this scope 5 | sscanf(buf, "%d", &a); | ^~~
s211385640
p03671
C++
#include <stdio.h> int main(void){ int a,b,c; int x; sscanf(buf, "%d", &a); sscanf(buf, "%d", &b); sscanf(buf, "%d", &c); x = a + b; if(x > b + c) x = b + c; if(x > c + a) x = c + a; printf("一番安いのは %d です。\n",x); return 0; }
a.cc: In function 'int main()': a.cc:7:12: error: 'buf' was not declared in this scope 7 | sscanf(buf, "%d", &a); | ^~~
s077862764
p03671
C++
#include <stdio.h> int main(void){ int a,b,c; int x; sscanf("%d", &a); sscanf("%d", &b); sscanf("%d", &c); x = a + b; if(x > b + c) x = b + c; if(x > c + a) x = c + a; printf("一番安いのは %d です。\n",x); return 0; }
a.cc: In function 'int main()': a.cc:7:18: error: cannot convert 'int*' to 'const char*' 7 | sscanf("%d", &a); | ^~ | | | int* In file included from a.cc:1: /usr/include/stdio.h:431:43: note: initializing argument 2 of 'int sscanf(const char...
s358339001
p03671
C
#include<stdio.h> int main(void){ int a,b,c; printf("数字を3つ入力してください"); scanf("%d%d%d",&a,&b,&c) int max = a; if (b>max) max = b; if (c>max) max = c; printf("合計金額は%d\n", a + b + c - max) return (0); }
main.c: In function 'main': main.c:6:28: error: expected ';' before 'int' 6 | scanf("%d%d%d",&a,&b,&c) | ^ | ; 7 | int max = a; | ~~~ main.c:8:10: error: 'max' undeclared (first use in this function) 8 | ...
s882777666
p03671
C++
#include<stdio.h> int main() { int a,b,c; do{ scanf("%d %d %d",&a,&b,&c); }while(!(1<=a && a<=10000 && 1<=b && b<=10000 && 1<=c && c<=10000)) int max; max = a; if(b > max) max = b; if(c > max) max = c; printf("%d\n",a+b+c-max); return 0; }
a.cc: In function 'int main()': a.cc:9:72: error: expected ';' before 'int' 9 | }while(!(1<=a && a<=10000 && 1<=b && b<=10000 && 1<=c && c<=10000)) | ^ | ; ...
s468554590
p03671
C++
#include<stdio.h> int main() { int a,b,c; do{ scanf("%d %d %d",&a,&b,&c); }while(!(1<=a && a<=10000 && 1<=b && b<=10000 && 1<=c && c<=10000)) int max = a; if(b > max) max = b; if(c > max) max = c; printf("%d\n",a+b+c-max); return 0; }
a.cc: In function 'int main()': a.cc:9:72: error: expected ';' before 'int' 9 | }while(!(1<=a && a<=10000 && 1<=b && b<=10000 && 1<=c && c<=10000)) | ^ | ; ...