submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s694638477
p03697
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vll; typedef vector<vll> vvll; typedef pair<ll,ll> P; typedef string str; typedef vector<P> vp; typedef vector<string> vs; typedef vector<bool> vb; const ll mod=1e9+7; const ll inf=1e16; #define rep(i,m,n) for(ll i=m;i<n;i++) #...
a.cc: In function 'void solve()': a.cc:35:17: error: operands to '?:' have different types 'const char*' and 'll' {aka 'long long int'} 35 | cout << (a>=10?"error":a) << endl; | ~~~~~^~~~~~~~~~
s360085581
p03697
C++
#include<bits/stdc++.h> using namespace std; int func(int A){ int A,B; cin >> A >> B; if(A+B>=10){ cout << "error" << endl; } else{ cout << A+B << endl; } }
a.cc: In function 'int func(int)': a.cc:5:7: error: declaration of 'int A' shadows a parameter 5 | int A,B; | ^ a.cc:4:14: note: 'int A' previously declared here 4 | int func(int A){ | ~~~~^ a.cc:13:1: warning: no return statement in function returning non-void [-Wreturn-type] 13...
s112003341
p03697
C++
#include <bits/stdc++.h> using namespace std; #define int long long #define endl "\n" #define pii pair<int, int> void solve(int TC) { int a, b; cin >> a >> b; cout << (a + b) >= 10 ? ("error") : (a + b) << endl; } signed main() { ios_base::sync_with_stdio(false); cin.tie...
a.cc: In function 'void solve(long long int)': a.cc:11:21: error: no match for 'operator>=' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'int') 11 | cout << (a + b) >= 10 ? ("error") : (a + b) << endl; | ~~~~~~~~~~~~~~~ ^~ ~~ | | ...
s479670622
p03697
C++
#include<bits/stdc++.h> #define ll long long #define dl long double #define pb push_back #define F first #define S second #define endl "\n" #define rep(i,a,b) for(i=a;i<b;i++) #define all(v) v.begin(),v.end(...
a.cc:29:6: error: variable or field 'AA' declared void 29 | void AA(flag) | ^~ a.cc:29:9: error: 'flag' was not declared in this scope 29 | void AA(flag) | ^~~~
s253190956
p03697
C++
#include <bits/stdc++.h> using namespace std; //定数 const long long MOD1=1000000007; const long long MOD2=998244353; const long long INF=1152921504606846976; const long double PI=3.1415926535897932; //型名省略 #define ll long long #define ull unsigned long long #define ld long double #define pll pair<long long,long long> ...
a.cc: In function 'int main()': a.cc:151:23: error: operands to '?:' have different types 'const char*' and 'long long int' 151 | cout<<(a+b>=10? "error": a+b)<<endl; | ~~~~~~~^~~~~~~~~~~~~~
s455920366
p03697
C++
#include<stdio.h> #include<iostream> #include<vector> #include<math.h> #include<queue> #include<map> #include<algorithm> #include<string.h> #include<functional> #include<limits.h> #include<stdlib.h> #include<string> #include<unordered_map> using namespace std; #define intmax INT_MAX #define lmax LONG_MAX #define uint...
a.cc: In function 'int main()': a.cc:52:9: error: 'S' was not declared in this scope 52 | cout<<S; | ^
s404905031
p03697
C++
#include <iostream> #include <math.h> #include <string> #include <algorithm> using namespace std; int main() { int n, m; cin >> n >> m; cout << (n+m>9 ? "error" : n+m); }
a.cc: In function 'int main()': a.cc:10:18: error: operands to '?:' have different types 'const char*' and 'int' 10 | cout << (n+m>9 ? "error" : n+m); | ~~~~~~^~~~~~~~~~~~~~~
s653529705
p03697
C++
#include <bits/stdc++.h> using namespace std; using LL = long long; #define REP(i, n) for (LL i = 0; i < (LL)(n); i++) #define FOR(i, m, n) for (LL i = m; i < n; i++) #define SORT(x) sort(x.begin(), x.end()) #define REVE(x) reverse(x.begin(), x.end()) #define ALL(x) (x).begin(), (x).end() #define SUM(x) accumulate(x.be...
a.cc: In function 'int main()': a.cc:22:17: error: expected ';' before '{' token 22 | (i!=j){ | ^ | ;
s935913820
p03697
C++
#include <bits/stdc++.h> using namespace std; using LL = long long; #define REP(i, n) for (LL i = 0; i < (LL)(n); i++) #define FOR(i, m, n) for (LL i = m; i < n; i++) #define SORT(x) sort(x.begin(), x.end()) #define REVE(x) reverse(x.begin(), x.end()) #define ALL(x) (x).begin(), (x).end() #define SUM(x) accumulate(x.be...
a.cc: In function 'int main()': a.cc:20:11: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsig...
s124945762
p03697
C++
#include <bits/stdc++.h> using namespace std; int main() { string n; cin >> n; int k=n.size(); vector<char> vec(k+1); for(int i=0;i<k;i++) vec[i+1]=n[i]; bool A=true; int s=1; count++; while(s <= k){ for(int i=0;i<k;i++){ if(vec[s] == n[i] &&count >2){ count++;} else if(vec[s]...
a.cc: In function 'int main()': a.cc:13:8: error: no post-increment operator for type 13 | count++; | ^~ a.cc:16:33: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator>' 16 | if(vec[s] == n[i] &&count >2){ | ~...
s094277007
p03697
C++
#include <bits/stdc++h> using namespace std; int main(){ int a,b; cin >> a >> b; if(a+b<=9){ cout << a+b << endl; } else{ cout << "error" << endl; } }
a.cc:1:10: fatal error: bits/stdc++h: No such file or directory 1 | #include <bits/stdc++h> | ^~~~~~~~~~~~~~ compilation terminated.
s331549802
p03697
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; using vi = vector<int>; using vvi = vector<vector<int>>; using vl = vector<ll>; using vvl = vector<vector<ll>>; #define MOD 1000000007ULL; #define rep(i,n) for(int i=0;i<n;i++) int main() { ll N,M; cin>>N>>M; if(N+M>=10) cout<<"error"<<endl; ...
a.cc: In function 'int main()': a.cc:16:20: error: 'A' was not declared in this scope 16 | else cout<<A+B<<endl; | ^ a.cc:16:22: error: 'B' was not declared in this scope 16 | else cout<<A+B<<endl; | ^
s995310015
p03697
C
#include<stdio.h> int main() { int a,b; scnaf("%d %d",&a,&b); if(a+b>=10)printf("error"); else printf("%d",a+b); return 0; }
main.c: In function 'main': main.c:7:2: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration] 7 | scnaf("%d %d",&a,&b); | ^~~~~ | scanf
s931097165
p03697
C
#include <stdio.h> int A, B; int main() { scanf("%d %d",&A,&B); int c= A+B; if(A+B<10); printf("%d",c); else printf("error"); return 0; }
main.c: In function 'main': main.c:9:4: error: 'else' without a previous 'if' 9 | else | ^~~~
s844854541
p03697
C
#include <stdio.h> int A, B; int main() { scanf("%d %d",&A,&B); int c= A+B; if(A+B<10); printf("%d,c"); else printf("error"); return 0; }
main.c: In function 'main': main.c:9:4: error: 'else' without a previous 'if' 9 | else | ^~~~
s209084539
p03697
C
#include <stdio.h> int A, B; int main() { scanf("%d %d",&A,&B); int c= A+B; if(A+B>=10); printf("error"); else printf("%d,c"); return 0; }
main.c: In function 'main': main.c:9:4: error: 'else' without a previous 'if' 9 | else | ^~~~
s953557487
p03697
C++
main(a,b){scanf("%d%d",&a,&b);a+b>9?puts("error"):printf("%d",a+b);}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(a,b){scanf("%d%d",&a,&b);a+b>9?puts("error"):printf("%d",a+b);} | ^
s484198979
p03697
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b; cin >> a >> b; if (a+b < 10){ cout < a+b < endl; } else{ cout < "error" <endl; } }
a.cc: In function 'int main()': a.cc:8:10: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 8 | cout < a+b < endl; | ~~~~ ^ ~~~ | | | | | int | std::ostream {aka std::basic_ostream<char>} a.cc:8:10: ...
s807061244
p03697
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() { int a,b; cin >> a >> b; oif(a+b>=10)cout << "error" << endl; else cout << a+b << endl; }
a.cc: In function 'int main()': a.cc:11:5: error: 'oif' was not declared in this scope 11 | oif(a+b>=10)cout << "error" << endl; | ^~~ a.cc:12:5: error: 'else' without a previous 'if' 12 | else cout << a+b << endl; | ^~~~
s075079883
p03697
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; long long MOD = 1000000000 + 7; long long MAX = 1000000000000000000; int main(){ cout << setprecision(10); int A,B; cin >> A >> B; cout << (A+B >= 10 ? "error" : A+B) << endl; }
a.cc: In function 'int main()': a.cc:14:22: error: operands to '?:' have different types 'const char*' and 'int' 14 | cout << (A+B >= 10 ? "error" : A+B) << endl; | ~~~~~~~~~~^~~~~~~~~~~~~~~
s542119722
p03697
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; int main() { int a,b;cin>>a>>b; if(a+b>=10) cout << "error" << endl; else cout << A+B << endl; }
a.cc: In function 'int main()': a.cc:9:16: error: 'A' was not declared in this scope 9 | else cout << A+B << endl; | ^ a.cc:9:18: error: 'B' was not declared in this scope 9 | else cout << A+B << endl; | ^
s359830814
p03697
C++
#include <bits/stdc++.h> using namespace std; int main() { int A. B; cin >> A >> B; if (A+B <= 9) { cout << A+B << endl; } else { cout << "error" << endl; } }
a.cc: In function 'int main()': a.cc:5:8: error: expected initializer before '.' token 5 | int A. B; | ^ a.cc:6:10: error: 'A' was not declared in this scope 6 | cin >> A >> B; | ^ a.cc:6:15: error: 'B' was not declared in this scope 6 | cin >> A >> B; | ...
s330771136
p03697
C++
#include <bits/stdc++.h> #define rep(i,n); for(int i = 0;i < (n);i++) using namespace std; typedef long long ll; typedef pair<int,int> P; long double pi = acos(-1); const int INF = 1001001001; // 最小公倍数を求める int euqlid (int a, int b){ int temp; temp = a % b; if(temp == 0)return b; return euqlid(b,temp); } ll co...
a.cc: In function 'int main()': a.cc:40:21: error: operands to '?:' have different types 'int' and 'const char*' 40 | cout << (a+b <= 10?a+b:"error") << endl; | ~~~~~~~~~^~~~~~~~~~~~
s632516809
p03697
C++
#include <bits/stdc++.h> #define rep(i,n); for(int i = 0;i < (n);i++) using namespace std; typedef long long ll; typedef pair<int,int> P; long double pi = acos(-1); const int INF = 1001001001; // 最小公倍数を求める int euqlid (int a, int b){ int temp; temp = a % b; if(temp == 0)return b; return euqlid(b,temp); } ll co...
a.cc:39:14: error: extended character   is not valid in an identifier 39 | cin >> a >> b; | ^ a.cc: In function 'int main()': a.cc:39:14: error: '\U00003000b' was not declared in this scope 39 | cin >> a >> b; | ^~~ a.cc:40:21: error: operands to '?:' have different types...
s530496934
p03697
C++
#include<bits/stdc++.h> using namespace std; template <typename T> using vec = vector<T>; int main() { int a,b; cin >> a >> b; cout << ((a+b>=10) ? a+b : "error") << endl; }
a.cc: In function 'int main()': a.cc:10:24: error: operands to '?:' have different types 'int' and 'const char*' 10 | cout << ((a+b>=10) ? a+b : "error") << endl; | ~~~~~~~~~~^~~~~~~~~~~~~~~
s490776455
p03697
C++
#include <bits/stdc++.h> using namespace std; int A,B; main(){cin>>A>>B;string sum=to_string(A+B);puts(A+B>9?"error":sum);}
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main(){cin>>A>>B;string sum=to_string(A+B);puts(A+B>9?"error":sum);} | ^~~~ a.cc: In function 'int main()': a.cc:4:54: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*' 4 |...
s284373765
p03697
C++
#include <bits/stdc++.h> using namespace std; int A,B; string sum=to_string(A+B); main(){cin>>A>>B;cout<<(A+B>10?"error":sum)<endl;}
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | main(){cin>>A>>B;cout<<(A+B>10?"error":sum)<endl;} | ^~~~ a.cc: In function 'int main()': a.cc:5:44: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type...
s431835491
p03697
C++
#include <bits/stdc++.h> int A,B; string sum=to_string(A+B); main(){ cin >> A>>B;cout<<(A+B>10?"error":sum)<endl;}
a.cc:3:1: error: 'string' does not name a type; did you mean 'stdin'? 3 | string sum=to_string(A+B); | ^~~~~~ | stdin a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared...
s857450667
p03697
C++
#include <bits/stdc++.h> int A,B; string s=std::to_string(A+B); main(){ std::cin >> A>>B;std::cout << (A+B>10 ? "error":s);}
a.cc:3:1: error: 'string' does not name a type; did you mean 'stdin'? 3 | string s=std::to_string(A+B); | ^~~~~~ | stdin a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:5:51: error: 's' was not declar...
s206184485
p03697
C++
#include <bits/stdc++.h> int A,B; main(){std::cin >> A>>B;std::cout << (A+B>10 ? "error":A+B);}
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main(){std::cin >> A>>B;std::cout << (A+B>10 ? "error":A+B);} | ^~~~ a.cc: In function 'int main()': a.cc:3:46: error: operands to '?:' have different types 'const char*' and 'int' 3 | main(){std::cin >> A>>B;std::co...
s521579216
p03697
C++
#include <bits/stdc++.h> int A,B; main(){ std::cin >> A>>B; std::cout << (A+B>10 ? "error":A+B); }
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:5:24: error: operands to '?:' have different types 'const char*' and 'int' 5 | std::cout << (A+B>10 ? "error":A+B); | ~~~~~~~^~~~~~~~~~~~~
s072407815
p03697
C++
#include <bits/stdc++.h> int A,B; main(){ int A,B; std::cin >> A>>B; std::cout << (A+B>10 ? "error":A+B) << endl; }
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:6:24: error: operands to '?:' have different types 'const char*' and 'int' 6 | std::cout << (A+B>10 ? "error":A+B) << endl; | ~~~~~~~^~~~~~~...
s382994593
p03697
C++
#include <bits/stdc++.h> using namespace std; int main(){ int A,B;cin >> A>>B;cout << (A+B>10 ? "error":A+B) << endl; }
a.cc: In function 'int main()': a.cc:5:39: error: operands to '?:' have different types 'const char*' and 'int' 5 | int A,B;cin >> A>>B;cout << (A+B>10 ? "error":A+B) << endl; | ~~~~~~~^~~~~~~~~~~~~
s881565775
p03697
C++
#include <bits/stdc++.h> using namespace std; int main(){ int A,B; cin >> A>>B; cout << (A+B>10 ? "error":A+B) << endl; }
a.cc: In function 'int main()': a.cc:7:19: error: operands to '?:' have different types 'const char*' and 'int' 7 | cout << (A+B>10 ? "error":A+B) << endl; | ~~~~~~~^~~~~~~~~~~~~
s081695107
p03697
C++
#include <bits/stdc++.h> using namespace std; int main(){ int A,B; cin >> A>>B; cout << (A+B>10?"error":A+B) << endl; }
a.cc: In function 'int main()': a.cc:7:18: error: operands to '?:' have different types 'const char*' and 'int' 7 | cout << (A+B>10?"error":A+B) << endl; | ~~~~~~^~~~~~~~~~~~
s876994318
p03697
C++
#include <iostream> #include <bitset> #include <vector> #include <string> #include <algorithm> #include <set> #include <map> #include <cmath> #include <regex> using namespace std; using ll = long long int; using dd = long double; const ll MOD = 1e9 + 7; vector<string> dfs(string s, ll depth, vector<char> symbol) { ...
a.cc: In function 'int main()': a.cc:52:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 52 | return; | ^~~~~~
s174341724
p03697
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int main() { int x, y; cin >> x >> y; if (a + b < 10) cout << a + b << endl; else cout << "error" << endl; }
a.cc: In function 'int main()': a.cc:8:7: error: 'a' was not declared in this scope 8 | if (a + b < 10) cout << a + b << endl; | ^ a.cc:8:11: error: 'b' was not declared in this scope 8 | if (a + b < 10) cout << a + b << endl; | ^
s637176202
p03697
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define PI 3.14159265358979323846 constexpr int INF = numeric_limits<int>::max() / 2; constexpr long long INFL = numeric_limits<long long>::max() / 2; constexpr int MOD = 1000000007; using Graph = vector<vector<int>>; ...
a.cc: In function 'int main()': a.cc:19:5: error: 'elsecout' was not declared in this scope 19 | elsecout <<A+B << endl; | ^~~~~~~~
s889896196
p03697
C++
#include <bits/stdc++.h> using namespace std; int main() { long a,b; cin >> a >> b; cout << ((a + b > 9)? "error" : ltoa(a + b)) << endl; }
a.cc: In function 'int main()': a.cc:10:41: error: 'ltoa' was not declared in this scope 10 | cout << ((a + b > 9)? "error" : ltoa(a + b)) << endl; | ^~~~
s721036410
p03697
C++
#include <bits/stdc++.h> #define rep(i, z, n) for(int i = z; i < n; i++) #define all(v) v.begin(), v.end() typedef long long ll; //const int INF = 1<<29; //const int MODINF = 1000000007; using namespace std; int main(){ int A, B; cin >> A >> B; if (A + B >= 10) cout << "error" << endl; else cout << A +...
a.cc:14:2: error: stray '#' in program 14 | }#include <bits/stdc++.h> | ^ a.cc:14:3: error: 'include' does not name a type 14 | }#include <bits/stdc++.h> | ^~~~~~~ a.cc:22:5: error: redefinition of 'int main()' 22 | int main(){ | ^~~~ a.cc:9:5: note: 'int main()' previously defined her...
s732116878
p03697
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(); if(a + b >= 10){ System.out.println("error"); } else { System.out.println(a + b); } }
Main.java:13: error: reached end of file while parsing } ^ 1 error
s701234610
p03697
C++
#include <iostream> #include <numeric> #include <iomanip> #include <string> // string, to_string, stoi #include <vector> // vector #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <utility> // pair, make_pair #include <tuple> // tuple, make_tuple #include <cstdint> // int64_t, in...
a.cc:37:1: error: expected declaration before '}' token 37 | } | ^
s517474946
p03697
C++
#include <iostream> #include <algorithm> #include <iomanip> using namespace std; string alphabet = "abcdefghijklmnopqrstuvwxyz"; string ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; int main(){ int a , b; cin >> a >> b; int k = a + b; if(k < 10)cout << k << endl; else << "error" << endl; }
a.cc: In function 'int main()': a.cc:13:8: error: expected primary-expression before '<<' token 13 | else << "error" << endl; | ^~
s636857640
p03697
C++
#include <bits/stdc++.h> #define rep(i,n) for (ll i=0; i<(n); i++) using namespace std; typedef long long ll; typedef pair<int,int> P; int dx[4]={1,0,-1,0}; int dy[4]={0,1,0,-1}; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template<class T> inline bool chmin(T& a, T b) {...
a.cc: In function 'int main()': a.cc:15:5: error: 'retrun' was not declared in this scope 15 | retrun 0; | ^~~~~~
s996223308
p03697
C++
#include <cstdio> int a,b; scanf("%d %d",&a,&b); if(a+b >= 10) { printf("error"); } else { printf("%d",a+b); }
a.cc:5:6: error: expected constructor, destructor, or type conversion before '(' token 5 | scanf("%d %d",&a,&b); | ^ a.cc:7:1: error: expected unqualified-id before 'if' 7 | if(a+b >= 10) | ^~ a.cc:11:1: error: expected unqualified-id before 'else' 11 | else | ^~~~
s756490721
p03697
C++
#include <cstdio> int a,b; scanf("%d %d",&a,&b); if(a+b == 10) { printf("error"); } else { printf("%d+%d",a,b); }
a.cc:5:6: error: expected constructor, destructor, or type conversion before '(' token 5 | scanf("%d %d",&a,&b); | ^ a.cc:7:1: error: expected unqualified-id before 'if' 7 | if(a+b == 10) | ^~ a.cc:11:1: error: expected unqualified-id before 'else' 11 | else | ^~~~
s523889089
p03697
C++
#include<bits/stdc++.h> using namespace std; int main(){ int A,B; cin >> A >> B; cout << (A + B >= 10 ? "error" : A + B) << endl; }
a.cc: In function 'int main()': a.cc:7:24: error: operands to '?:' have different types 'const char*' and 'int' 7 | cout << (A + B >= 10 ? "error" : A + B) << endl; | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
s752142023
p03697
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b; cin >> a >> b; if ( a + b < 10 ){ cout << a + b << endl: }else{ cout << "error" << endl; } }
a.cc: In function 'int main()': a.cc:10:26: error: expected ';' before ':' token 10 | cout << a + b << endl: | ^ | ;
s046337032
p03697
C++
#include<bits/stdc++.h> using namespace std; int main(){ int A,B; cin>>A>>B; if(A+B>=10) { cout<<"error"<<endl: } else{ cout<<A+B<<endl; } }
a.cc: In function 'int main()': a.cc:8:22: error: expected ';' before ':' token 8 | cout<<"error"<<endl: | ^ | ;
s633731119
p03697
C++
a,b=map(int,input().split()) ans=a+b if a+b<10 else "error" print(ans)
a.cc:1:1: error: 'a' does not name a type 1 | a,b=map(int,input().split()) | ^
s111386174
p03697
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define zero_pad(num) setfill('0') << std::right << setw(num) using namespace std; using ll = long long; using ld = long double; using P = pair<int, int>; int main() { int a, b; cin >> a >> b; cout << ((a + b < 10) ? a + b : "error") ...
a.cc: In function 'int main()': a.cc:12:27: error: operands to '?:' have different types 'int' and 'const char*' 12 | cout << ((a + b < 10) ? a + b : "error") << endl; | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
s612459957
p03697
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b; cin >> a >> b; cout << (a+b >= 10 ? "error" : a+b) << endl; }
a.cc: In function 'int main()': a.cc:7:24: error: operands to '?:' have different types 'const char*' and 'int' 7 | cout << (a+b >= 10 ? "error" : a+b) << endl; | ~~~~~~~~~~^~~~~~~~~~~~~~~
s131927605
p03697
C++
#include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> #define IO(i, o) freopen(i, "r", stdin), freopen(o, "w", stdout) using namespace std; using namespace __gnu_pbds; typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set; m...
a.cc: In function 'int main()': a.cc:18:32: error: operands to '?:' have different types 'const char*' and 'int' 18 | cout << ((a + b >= 10) ? "error\n" : a + b); | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
s017049037
p03697
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b; cin >> a >> b; if(a+b>=10){ cout << "error" << endl; }else{ cout << a+b << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:2: error: expected '}' at end of input 11 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s606893417
p03697
C++
// Copyright 2020 yaito3014 #include <bits/stdc++.h> using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int A, B; cin >> A >> B; cout << (A + B >= 10 ? "error" : A + B) << endl; }
a.cc: In function 'int main()': a.cc:9:24: error: operands to '?:' have different types 'const char*' and 'int' 9 | cout << (A + B >= 10 ? "error" : A + B) << endl; | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
s992871598
p03697
C++
#include<bits/stdc++.h> using namespace std; #define ll long long int int main(){ int a,b; cin>>a>>b; if(a+b>=10)cout<"error"; else cout<<a+b; return 0; }
a.cc: In function 'int main()': a.cc:8:20: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [6]') 8 | if(a+b>=10)cout<"error"; | ~~~~^~~~~~~~ | | | | | const char [6] | ...
s683622029
p03697
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(int)(n);i++) int main(){ string s; cin >> s; int n = s.size(); bool flag = false for(int i = 0; i < n; i++){ for(int j = i+1; j < n; j++){ if(s[i]==s[j]){ flag = true; break; ...
a.cc: In function 'int main()': a.cc:8:5: error: expected ',' or ';' before 'for' 8 | for(int i = 0; i < n; i++){ | ^~~ a.cc:8:20: error: 'i' was not declared in this scope 8 | for(int i = 0; i < n; i++){ | ^
s583313532
p03697
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; cin >> A >> B; sum = A + B; if (sum >= 10) { cout << "error" << endl; } else { cout << sum << endl; } }
a.cc: In function 'int main()': a.cc:7:3: error: 'sum' was not declared in this scope 7 | sum = A + B; | ^~~
s059932370
p03697
C++
#include <bits/stdc++.h> using namespace std; int grouping(int n) { int A, B; cin >> A >> B; sum = A + B; if (sum >= 10) { cout << "error" << endl; } else { cout << sum << endl; } }
a.cc: In function 'int grouping(int)': a.cc:7:3: error: 'sum' was not declared in this scope 7 | sum = A + B; | ^~~ a.cc:13:1: warning: no return statement in function returning non-void [-Wreturn-type] 13 | } | ^
s269290130
p03697
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;cin>>a>>b; cout << (a+b>9) ? "error" : a+b; }
a.cc: In function 'int main()': a.cc:7:19: error: operands to '?:' have different types 'const char*' and 'int' 7 | cout << (a+b>9) ? "error" : a+b; | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
s727582230
p03697
C++
#include <bits/stdc++.h> using namespace std; // #define int long long #define endl '\n' #define ll long long #define ld long double #define fi first #define se second #define pii pair<int, int> #define pll pair<long long, long long> #define mod (ll) (1e9 + 7) #define fast ios_base::sync_with_stdio(false);cin.tie(NULL...
a.cc: In function 'int32_t main()': a.cc:26:28: error: operands to '?:' have different types 'const char*' and 'int' 26 | cout << (a + b > 9 ? "error" : a + b) << endl; | ~~~~~~~~~~^~~~~~~~~~~~~~~~~
s982375723
p03697
C++
using namespace std; int main(){ int a,b; cin>>a>>b; int c=a+b; if(c>=10){ cout<<"error"; }else{ cout<<c; } return 0; }
a.cc: In function 'int main()': a.cc:4:3: error: 'cin' was not declared in this scope 4 | cin>>a>>b; | ^~~ 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:7:5: error: 'cout'...
s341877784
p03697
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,; cin>> a >> b; if(a+b<10) cout << a+b << endl; else cout << "error" << endl; }
a.cc: In function 'int main()': a.cc:5:11: error: expected unqualified-id before ';' token 5 | int a,b,; | ^
s655108106
p03697
C++
#include<iostream> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<((a+b<10)?a+b:"error")<<endl;}
a.cc: In function 'int main()': a.cc:6:18: error: operands to '?:' have different types 'int' and 'const char*' 6 | cout<<((a+b<10)?a+b:"error")<<endl;} | ~~~~~~~~^~~~~~~~~~~~
s942944270
p03697
C++
#include<iostream> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<(a+b<10?a+b:"error")<<endl;}
a.cc: In function 'int main()': a.cc:6:16: error: operands to '?:' have different types 'int' and 'const char*' 6 | cout<<(a+b<10?a+b:"error")<<endl;} | ~~~~~~^~~~~~~~~~~~
s613666607
p03697
C++
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for(int i = 0; i < n; i++) using ll = long long; int main() { int a,b; cin >> a >> b; int sum = a+b; cout << ((sum>=10) ? "error" : sum) << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:22: error: operands to '?:' have different types 'const char*' and 'int' 9 | cout << ((sum>=10) ? "error" : sum) << endl; | ~~~~~~~~~~^~~~~~~~~~~~~~~
s459007425
p03697
C++
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #define debug(var) cerr << #var << " = " << var << endl; #else #define debug(var) #endif void init() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); } void solve() { int a, b; cin >> a >> b; if (a+b >= 10) cout << "error" else cout << a+b; } i...
a.cc: In function 'void solve()': a.cc:17:39: error: expected ';' before 'else' 17 | if (a+b >= 10) cout << "error" | ^ | ; 18 | else cout << a+b; | ~~~~
s104278458
p03697
C++
#include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0; i<(n); i++) #define REP2(i,x,n) for(int i=x; i<(n); i++) int main() { int A,B; cin >> A>>B; cout << (A+B>=10?"error":A+B) << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:21: error: operands to '?:' have different types 'const char*' and 'int' 10 | cout << (A+B>=10?"error":A+B) << endl; | ~~~~~~~^~~~~~~~~~~~
s319337332
p03697
C
#include <stdio.h> int main(void){ int x,y; scanf("%d%d",&x,&y); x+y<10 ? printf("%d",x+y); : printf("error"); return 0; }
main.c: In function 'main': main.c:5:34: error: expected ':' before ';' token 5 | x+y<10 ? printf("%d",x+y); : printf("error"); | ^ | : main.c:5:36: error: expected expression before ':' token 5 | x+y<10 ? printf("%d",...
s874957418
p03697
C++
#include<iostream> using namespace std; int main(){ int a,b; cin >> a >> b; cout << ((a+b<10) ? a+b:"error") << endl; }
a.cc: In function 'int main()': a.cc:6:21: error: operands to '?:' have different types 'int' and 'const char*' 6 | cout << ((a+b<10) ? a+b:"error") << endl; | ~~~~~~~~~^~~~~~~~~~~~~
s466285717
p03697
C++
#include<cstdio> using namespace std; int pd(int a,int b) { if(a+b>=10) return 0; return 1; } int main() { int a,b; scanf("%d%d",&a,&b); if(pd(a,b)) printf("%d%d,a+b); else printf("%d%d",0); return 0; }
a.cc:14:16: warning: missing terminating " character 14 | printf("%d%d,a+b); | ^ a.cc:14:16: error: missing terminating " character 14 | printf("%d%d,a+b); | ^~~~~~~~~~~ a.cc: In function 'int pd(int, int)': a.cc:6:16: error: unable to find numeric literal...
s755093918
p03697
C++
#include<iostream> #include<stdio.h> //#include <bits/stdc++.h> #include<vector> #include<float.h> #include<iomanip> #include<algorithm> #include<string> #include<cstring> #include<math.h> #include<cmath> #include<sstream> #include<set> #include<map> #include<...
a.cc: In function 'int main()': a.cc:34:21: error: operands to '?:' have different types 'int' and 'const char*' 34 | cout<<(a+b<10 ? a+b : "error"); | ~~~~~~~^~~~~~~~~~~~~~~
s722340305
p03697
C++
include <bits/stdc++.h> using namespace std; int main() { int A=0, B=0; cin >> A >> B; int sum = A+B; if(10<=sum) { cout << "error" << endl; } else { cout << sum << endl; } return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include <bits/stdc++.h> | ^~~~~~~ a.cc: In function 'int main()': a.cc:8:3: error: 'cin' was not declared in this scope 8 | cin >> A >> B; | ^~~ a.cc:14:5: error: 'cout' was not declared in this scope 14 | cout << "error" << endl; ...
s590473337
p03697
C++
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #include <queue> #include <stack> #include <map> #include <set> #include <vector> #include <iomanip> #define ALL(x) (x).begin(), (x).end() #define sz(a) int(a.size()) #define rep(i,x,n) for(int i=x;i<n;i++) #define repd(i,x,n...
a.cc: In function 'int main()': a.cc:50:17: error: expected primary-expression before '>=' token 50 | if (a + b + >= 10) | ^~
s409966465
p03697
C++
#include<iostream> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<(a+b<=10?a+b:"error")<<endl; }
a.cc: In function 'int main()': a.cc:6:19: error: operands to '?:' have different types 'int' and 'const char*' 6 | cout<<(a+b<=10?a+b:"error")<<endl; | ~~~~~~~^~~~~~~~~~~~
s021631349
p03697
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ABC063A { class Program { static void Main(string[] args) { int a, b, s; s = 10; a = int.Parse(Console.ReadLine()); b = int.Parse(Console.ReadLine()); if (s > (a + b)) {...
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...
s400219117
p03697
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ABC063A { class Program { static void Main(string[] args) { int a, b, s; s = 10; a = int.Parse(Console.ReadLine()); b = int.Parse(Console.ReadLine()); if (s > (a + b)) {...
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...
s322153171
p03697
C++
#include<iostream> #include<stdio.h> #include<string> #include<vector> #include<map> #include<tuple> #include<algorithm> #include<cmath> #include<limits> #include<set> #include<queue> using namespace std; #define int long long int #define rep(i, n) for (int i = 0; i < (int)(n); i++) int gcd(int a, int b) { return b ? ...
a.cc: In function 'int main()': a.cc:24:28: error: expected '}' at end of input 24 | else cout << A + B; | ^ a.cc:20:15: note: to match this '{' 20 | signed main() { | ^
s931219488
p03697
C++
#include <iostream> // cout, endl, cin #include <iomanip> #include <string> // string, to_string, stoi #include <vector> // vector #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <utility> // pair, make_pair #include <tuple> // tuple, make_tuple #...
a.cc: In function 'int main()': a.cc:29:10: error: expected initializer before '.' token 29 | int a. b; | ^ a.cc:30:12: error: 'a' was not declared in this scope 30 | cin >> a >> b; | ^ a.cc:30:17: error: 'b' was not declared in this scope 30 | cin >> a >> b; |...
s656987895
p03697
C++
#include <iostream> using namespace std; int main(void) { int A,B; cin>>A>>B; cout<<((A+B)<=9?(A+B):"error")<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:18: error: operands to '?:' have different types 'int' and 'const char*' 6 | cout<<((A+B)<=9?(A+B):"error")<<endl; | ~~~~~~~~^~~~~~~~~~~~~~
s616289373
p03697
C++
#include<bits/stdc++.h> using namespace std; int main(){ int A,B; cin >> A >> B; cout << (A + B <= 10 ? A + B : "error") << endl; }
a.cc: In function 'int main()': a.cc:7:24: error: operands to '?:' have different types 'int' and 'const char*' 7 | cout << (A + B <= 10 ? A + B : "error") << endl; | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
s507388053
p03697
C
x,y=input().split() print(int(x)+int(y)) #o mor khoda re... 50 er niche naki charachter run hoyna.. ki jana
main.c:1:1: warning: data definition has no type or storage class 1 | x,y=input().split() | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'x' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in declaration of 'y' [-Wimplicit-int] 1 | x,y=input().split() | ^ main.c:1:5: er...
s716856550
p03697
C++
#include<bits/stdc++.h> #define REP(i, n) for(int i = 0; i < (int)n; i++) #define REPvec(itr, mp) for(auto itr = mp.begin();itr != mp.end(); itr ++) #define all(x) x.begin(), x.end() #define MOD 1000000007//1e9+7 using namespace std; typedef long long ll; typedef vector<int > vecint; typedef vector<string > vecstr; ...
a.cc: In function 'int main()': a.cc:14:27: error: operands to '?:' have different types 'const char*' and 'int' 14 | cout << (((a + b) >= 10)?"error":a+b) << endl; | ~~~~~~~~~~~~~~~^~~~~~~~~~~~
s064773485
p03697
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b; cin >> a >> b; cout << (a+b>=10?"error":a+b) << endl; }
a.cc: In function 'int main()': a.cc:9:25: error: operands to '?:' have different types 'const char*' and 'int' 9 | cout << (a+b>=10?"error":a+b) << endl; | ~~~~~~~^~~~~~~~~~~~
s233498565
p03697
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b; cin >> a >> b; cout << ((a+b>=10)?"error":(a+b)) << endl; }
a.cc: In function 'int main()': a.cc:9:27: error: operands to '?:' have different types 'const char*' and 'int' 9 | cout << ((a+b>=10)?"error":(a+b)) << endl; | ~~~~~~~~~^~~~~~~~~~~~~~
s253295070
p03697
C++
A, B = map(int, input().split()) print(A+B if A+B < 10 else 'error')
a.cc:2:28: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 2 | print(A+B if A+B < 10 else 'error') | ^~~~~~~ a.cc:1:1: error: 'A' does not name a type 1 | A, B = map(int, input().split()) | ^
s469336023
p03697
C++
#include "bits/stdc++.h" using namespace std; #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define repr(i, n) for (int i = (int)(n)-1; i >= 0; i--) #define INF 1e9 using ll = std::int64_t; template <class T>bool chmax(T &a, const T ...
a.cc: In function 'void Main()': a.cc:32:29: error: operands to '?:' have different types 'const char*' and 'int' 32 | std::cout << (a + b >= 10 ? "error" : a + b) << std::endl; | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
s097810266
p03697
C++
#include <iostream> using namespace std; int main() { int a, b; cin >> a >> b; cout << (a + b >= 10 ? "error" : a + b) << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:26: error: operands to '?:' have different types 'const char*' and 'int' 8 | cout << (a + b >= 10 ? "error" : a + b) << endl; | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
s183098608
p03697
C++
#include <iostream> #include <cstdio> #include <cstring> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<(a+b>=10?"error":a+b); }
a.cc: In function 'int main()': a.cc:8:17: error: operands to '?:' have different types 'const char*' and 'int' 8 | cout<<(a+b>=10?"error":a+b); | ~~~~~~~^~~~~~~~~~~~
s095158816
p03697
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a, b; cin >> a >>b; if(a+b>=10) cout <<"error" << end; else cout << a + b << endl; return 0; }
a.cc: In function 'int main()': a.cc:6:30: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 6 | if(a+b>=10) cout <<"error" << end; | ~~~~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/istream:41, ...
s542974385
p03697
C++
#include <bits/stdc++.h> using namespace std; int main() { int x , y; cin >> x >> y; cout << (x + y >= 10 ? "error" : x + y) << endl ; }
a.cc: In function 'int main()': a.cc:8:24: error: operands to '?:' have different types 'const char*' and 'int' 8 | cout << (x + y >= 10 ? "error" : x + y) << endl ; | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
s034109486
p03697
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; cin >> A >> B; string X = A + B; cout << (A+B>10?X:"error") << endl; }
a.cc: In function 'int main()': a.cc:7:16: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested 7 | string X = A + B; | ~~^~~
s981182351
p03697
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; cin >> A >> B; string X = A + B; cout << (A+B>10?X:"error") << endl; }
a.cc: In function 'int main()': a.cc:7:16: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested 7 | string X = A + B; | ~~^~~
s547526030
p03697
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; cin >> A >> B; cout << (A+B>10?A+B:"error") << endl; }
a.cc: In function 'int main()': a.cc:7:18: error: operands to '?:' have different types 'int' and 'const char*' 7 | cout << (A+B>10?A+B:"error") << endl; | ~~~~~~^~~~~~~~~~~~
s360738548
p03697
C++
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define REPR(i, n) for (int i = n; i >= 0; i--) #define FOR(i, m, n) for (int i = m; i < n; i++) #define ALL(v) v.begin(), v.end() using namespace std; typedef long long ll; typedef long double ld; int main() { ios::sync_with_stdio(false); cin.t...
a.cc: In function 'int main()': a.cc:16:20: error: operands to '?:' have different types 'const char*' and 'int' 16 | cout << (a+b>=10 ? "error" : a+b) << endl; | ~~~~~~~~^~~~~~~~~~~~~~~
s070140312
p03697
C++
#include<iostream> using namespace std; int main(){ int A,B; cin>>A>>B; if (A+B>=10){ cout <<"error"; else cout << A+B; return 0; }
a.cc: In function 'int main()': a.cc:8:4: error: expected '}' before 'else' 8 | else cout << A+B; | ^~~~ a.cc:6:14: note: to match this '{' 6 | if (A+B>=10){ | ^
s355317176
p03697
C++
#include<iostream> using namespace std; int main(){ int A,B; cin>>A>>B; cout << A+B; if (A+B>=10){ cout <<"error"; else cout << A+B; return 0; }
a.cc: In function 'int main()': a.cc:9:4: error: expected '}' before 'else' 9 | else cout << A+B; | ^~~~ a.cc:7:14: note: to match this '{' 7 | if (A+B>=10){ | ^
s213416646
p03697
C++
using System; using System.Collections.Generic; namespace ConsoleApp_CS { class Program { static void Main(string[] args) { var a = CIn.ReadInt(); var b = CIn.ReadInt(); a = a + b; if (a >= 10) { Console.WriteLine("err...
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:9:26: error: 'string' has not been declared 9 | static void Main(stri...
s480411298
p03697
Java
import java.util.*; class Main { public static void main(String[] args){ Scenner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = a + b; if(c <= 9){ System.out.println(c); }else{ System.out.println("error"); } } }
Main.java:6: error: cannot find symbol Scenner sc = new Scanner(System.in); ^ symbol: class Scenner location: class Main 1 error
s571387029
p03697
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b; cin >> a >> b; cout << (a + b >=10 ? "error" : a + b) << endl; }
a.cc: In function 'int main()': a.cc:6:23: error: operands to '?:' have different types 'const char*' and 'int' 6 | cout << (a + b >=10 ? "error" : a + b) << endl; | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~