submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s076563268 | 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 {
"error"
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before '}' token
10 | "error"
| ^
| ;
11 | }
| ~
|
s975525878 | p03697 | C++ | #include <bits/stdc++.h>
#include <ctype.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:7:5: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
7 | cin << a << b ;
| ~~~ ^~ ~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:7:5: note: candidate: 'operator<<... |
s801734659 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main (){
int a, b;
cin>>a>>b;
if(a+b>9){
cout<<"error<<endl;
}
else{
cout<<a+b<<endl;
}
} | a.cc:8:13: warning: missing terminating " character
8 | cout<<"error<<endl;
| ^
a.cc:8:13: error: missing terminating " character
8 | cout<<"error<<endl;
| ^~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:9:5: error: expected primary-expression before '}' token
... |
s321655580 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main (){
int a, b;
cin>>a>>b;
cout<<(a+b>9?"error":a+b)<<endl;
} | a.cc: In function 'int main()':
a.cc:7:17: error: operands to '?:' have different types 'const char*' and 'int'
7 | cout<<(a+b>9?"error":a+b)<<endl;
| ~~~~~^~~~~~~~~~~~
|
s492591584 | p03697 | C++ | #include<iostream>
using namespace std;
int main(){
signed int a, b;
cin >> a >> b;
signed int outNumber = a + b;
if(outNumber >= 10){
cout >> "error" >> endl;
}
else{
cout >> outNumber >> endl;
}
} | a.cc: In function 'int main()':
a.cc:9:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [6]')
9 | cout >> "error" >> endl;
| ~~~~ ^~ ~~~~~~~
| | |
| | const char [6]
| std::ostream {aka std... |
s016687182 | p03697 | C++ | #include <iostream>
int main(void){
int x,y;
cin >> x >> y;
if (x + y < 10){
std::cout << "x + y" << std::endl;
}
else{
std::cout << "error" << std::endl;
}
}
| a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin >> x >> y;
| ^~~
| 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 t... |
s365308469 | 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:8:13: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
8 | else cout >> a + b >> endl;
| ~~~~ ^~ ~~~~~
| | |
| | int
| std::ostream {aka std::basic... |
s478594050 | p03697 | C++ | import java.io.PrintWriter
import java.util.*
import java.math.*
import java.lang.*
import kotlin.comparisons.*
val pw = PrintWriter(System.out)
val MOD: Long = (1e+9 + 7).toLong()
fun main(args: Array<String>) {
val (a, b) = readListOfInt()
println(if(a+b >= 10) "error" else a+b)
pw.flush()
}
/****** D... | a.cc:52:18: error: too many decimal points in number
52 | for(i in 0..perm.size) {
| ^~~~~~~~~~~~
a.cc:63:14: error: too many decimal points in number
63 | val v = (0..n).map { (0..n).map{0L}.toMutableList() }.toMutableList()
| ^~~~
a.cc:63:27: error: too many... |
s593115056 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int A,B;
int sum = A+B;
cout << ((sum >= 10) ? "error" : sum) << endl;
}
| a.cc: In function 'int main()':
a.cc:6:26: error: operands to '?:' have different types 'const char*' and 'int'
6 | cout << ((sum >= 10) ? "error" : sum) << endl;
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~
|
s214303772 | p03697 | C++ | #inhclude<stdio.h>
int main(void)
{
int a,b;
scanf("%d %d",&a,&b);
if(a+b>=10) printf("error\n");
else printf("%d",a+b);
return 0;
}
| a.cc:1:2: error: invalid preprocessing directive #inhclude; did you mean #include?
1 | #inhclude<stdio.h>
| ^~~~~~~~
| include
a.cc: In function 'int main()':
a.cc:5:9: error: 'scanf' was not declared in this scope
5 | scanf("%d %d",&a,&b);
| ^~~~~
a.cc:6:25: error: 'printf' ... |
s392846812 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int INF = 1e9;
//long long
using ll = long long;
//出力系
#define print(x) cout << x << endl
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
// begin() en... | a.cc: In function 'int main()':
a.cc:50:1: error: expected ',' or ';' before 'if'
50 | if(ans >= 10) print("error");
| ^~
a.cc:51:1: error: 'else' without a previous 'if'
51 | else print(ans);
| ^~~~
|
s942426212 | p03697 | C++ | #include<iostream>
using namespace std;
int main() {
int a,b; cin >> a >> b ;
if (a+b) > 9) cout << "error";
else cout << a+b ;
} | a.cc: In function 'int main()':
a.cc:8:12: error: expected primary-expression before '>' token
8 | if (a+b) > 9) cout << "error";
| ^
|
s678307894 | p03697 | C++ | #include<iostream>
using namespace std;
int main() {
int a,b; cin >> a >> b ;
cout << ((a+b) > 9) ? "error" : a+b << endl;
} | a.cc: In function 'int main()':
a.cc:8:39: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
8 | cout << ((a+b) > 9) ? "error" : a+b << endl;
| ~~~~^~~~~~~
|
s938979916 | p03697 | C++ | #include<iostream>
using namespace std;
int main() {
int a,b; cin >> a >> b ;
cout << (a+b) >= 9 ? "error" : a+b << endl;
} | a.cc: In function 'int main()':
a.cc:8:17: error: no match for 'operator>=' (operand types are 'std::basic_ostream<char>' and 'int')
8 | cout << (a+b) >= 9 ? "error" : a+b << endl;
| ~~~~~~~~~~~~~ ^~ ~
| | |
| | int
| std::basic_ostream<char>
a.cc... |
s041881791 | p03697 | C++ | #include<iostream>
using namespace std;
int main() {
int a,b; cin >> a >> b ;
cout << (a+b) > 9 ? "error" : a+b << endl;
} | a.cc: In function 'int main()':
a.cc:8:17: error: no match for 'operator>' (operand types are 'std::basic_ostream<char>' and 'int')
8 | cout << (a+b) > 9 ? "error" : a+b << endl;
| ~~~~~~~~~~~~~ ^ ~
| | |
| | int
| std::basic_ostream<char>
a.cc:8:17... |
s780214219 | p03697 | C++ | #include <iostream>
using namespace std;
int main(){
int A, B;
cin >> A >> B;
cout << (A+B < 10)? A+B:"error";
}
| a.cc: In function 'int main()':
a.cc:9:21: error: operands to '?:' have different types 'int' and 'const char*'
9 | cout << (A+B < 10)? A+B:"error";
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
|
s362695883 | p03697 | C++ | #include <iostream>
using namespace std;
int main(){
int A, B;
cin >> A >> B;
cout << A+B < 10? A+B:"error";
}
| a.cc: In function 'int main()':
a.cc:9:15: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and 'int')
9 | cout << A+B < 10? A+B:"error";
| ~~~~~~~~~~~ ^ ~~
| | |
| | int
| std::basic_ostream<char>
a.cc:9:15: note: candidate... |
s455643749 | p03697 | C++ | #include <iosrteam>
using namespace std;
int main(){
int A, B;
cin >> A >> B;
cout << A+B < 10? A+B:"error";
} | a.cc:1:10: fatal error: iosrteam: No such file or directory
1 | #include <iosrteam>
| ^~~~~~~~~~
compilation terminated.
|
s745555050 | p03697 | C++ | #inslude<iostream>
using namespace std;
int main(){
int A, B;
cin >> A >> B;
if(A+B < 10) cout << A+B;
else cout << "error";
return 0;
} | a.cc:1:2: error: invalid preprocessing directive #inslude; did you mean #include?
1 | #inslude<iostream>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
6 | cin >> A >> B;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<io... |
s543525343 | p03697 | C++ | #include <iostream>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <string>
#include <cmath>
#include <cassert>
#include <functional>
#include <string>
#include <sstream>
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:16:23: error: operands to '?:' have different types 'int' and 'const char*'
16 | cout << (A + B < 10 ? A + B : "error") << endl;
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
s445583842 | p03697 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF (1ll << 60)
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
typedef pair<ll, ll> p;
constexpr int MOD = ... | a.cc: In function 'int main()':
a.cc:37:32: error: expected ';' before 'return'
37 | cout << "error" << endl return 0;
| ^~~~~~~
| ;
|
s814611308 | p03697 | C++ | # -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import math
import itertools
import random
# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics impo... | a.cc:1:3: error: invalid preprocessing directive #-
1 | # -*- coding: utf-8 -*-
| ^
a.cc:13:3: error: invalid preprocessing directive #NO
13 | # NO, PAY-PAY
| ^~
a.cc:14:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
14 | #import numpy as np
| ^~~~~~
a.cc:14:9: error: ... |
s258224182 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
#define a first
#define b second
#define sz size()
#define pb(x) push_back(x)
#define bg begin()
#define ed end()
#define rep(i,n) for(ll i=0;i<n;i++)
#define rep1(i,n) for(ll i=1;i<=n;i++)
#define mp(x,y) make_pair(x,y)
const l... | a.cc: In function 'int main()':
a.cc:35:16: error: operands to '?:' have different types 'll' {aka 'long long int'} and 'const char*'
35 | cout<<(A+B<10?A+B:"error");
| ~~~~~~^~~~~~~~~~~~
|
s416436899 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int a,b;
int main()
{
int a,b;
cin>>a>>b;
if(a+b=>10||a>10||b>10) cout<<"error"<<endl;
else cout<<a+b<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:16: error: expected primary-expression before '>' token
8 | if(a+b=>10||a>10||b>10) cout<<"error"<<endl;
| ^
|
s760131403 | 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:11:20: error: invalid operands of types 'const char [7]' and '<unresolved overloaded function type>' to binary 'operator<<'
11 | cout <"<error" <<endl;
| ~~~~~~~~~^~~~~~
|
s512870141 | 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:11:12: error: 'error' was not declared in this scope; did you mean 'perror'?
11 | cout <<error <<endl;
| ^~~~~
| perror
|
s790114059 | 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 if{
cout <<error <<endl;
}
} | a.cc: In function 'int main()':
a.cc:10:10: error: expected '(' before '{' token
10 | else if{
| ^
| (
|
s900924390 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
char jubge = 'z';
bool a = true;
cin >> s;
sort(s.begin(),s.end());
for(int i = 0; i < s.size(); i++){
if(z == s.at(i)){
a = false;
break;
}else{
jubge = s.at(i);
}
}
if(a)
cout << "yes" << endl;
el... | a.cc: In function 'int main()':
a.cc:11:8: error: 'z' was not declared in this scope
11 | if(z == s.at(i)){
| ^
|
s378246195 | 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:8:25: error: operands to '?:' have different types 'int' and 'const char*'
8 | cout << (A + B < 10 ? A + B : "error") << endl;
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
s944797876 | 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:8:19: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and 'int')
8 | cout << A + B < 10 ? A + B : "error" << endl;
| ~~~~~~~~~~~~~ ^ ~~
| | |
| | int
| std::basic_ostream<c... |
s582641825 | p03697 | C++ | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ABCtest
{
delegate void Signal();
class Program
{
static void Main(string[] args)
{
int A, B ,Ans;
string[] value = Console.ReadLine... | 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... |
s034271130 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A,B;
cin >>A>>B;
if((A+B)>=10){
cout <<"error";
}
else{
cotu <<A+B;
}
}
| a.cc: In function 'int main()':
a.cc:11:5: error: 'cotu' was not declared in this scope
11 | cotu <<A+B;
| ^~~~
|
s190223874 | p03697 | C++ | A,B = list(map(int,input().split(' ')))
#print(n,m)
c = A+B
ans = 'error' if c >=10 else c
print(ans) | a.cc:2:2: error: invalid preprocessing directive #print
2 | #print(n,m)
| ^~~~~
a.cc:4:7: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
4 | ans = 'error' if c >=10 else c
| ^~~~~~~
a.cc:1:1: error: 'A' does not name a type
1 | A,B = list(map(int,input().... |
s149915583 | p03697 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); i++)
#define rep1(i,n) for (int i = 1; i <= (n); i++)
#define repi(i,a,b) for (int i = (a); i < (b); i++)
#define all(x) (x).begin(),(x).end()
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
using vi... | a.cc: In function 'int main()':
a.cc:24:11: error: expected '(' before '{' token
24 | else if {
| ^
| (
|
s129231661 | p03697 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); i++)
#define rep1(i,n) for (int i = 1; i <= (n); i++)
#define repi(i,a,b) for (int i = (a); i < (b); i++)
#define all(x) (x).begin(),(x).end()
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
using vi... | a.cc: In function 'int main()':
a.cc:21:19: error: operands to '?:' have different types 'int' and 'const char*'
21 | cout << (A+B<=9 ? A+B : "error") << endl;
| ~~~~~~~^~~~~~~~~~~~~~~
|
s214804673 | 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;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:26: error: operands to '?:' have different types 'const char*' and 'int'
7 | cout << ((a + b >= 10) ? "error": a + b) << endl;
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
|
s484228999 | p03697 | C++ | #include <iostream>
using namespace std;
int main()
{
int a, b; cin >> a >> b;
cout << (a+b <= 9 ? a+b : "error");
return 0;
} | a.cc: In function 'int main()':
a.cc:7:21: error: operands to '?:' have different types 'int' and 'const char*'
7 | cout << (a+b <= 9 ? a+b : "error");
| ~~~~~~~~~^~~~~~~~~~~~~~~
|
s308775923 | p03697 | C++ | #include<iostream>
#include<algorithm>
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:8:24: error: operands to '?:' have different types 'const char*' and 'int'
8 | cout << (a + b >= 10 ? "error": a + b) << endl;
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
|
s138688069 | p03697 | C++ | #include<iostream>
#include<algorithm>
#include<string>
#include<vector>
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:22: error: operands to '?:' have different types 'const char*' and 'int'
9 | cout << (a+b>=10 ? "error" : a+b) << endl;
| ~~~~~~~~^~~~~~~~~~~~~~~
|
s427929413 | p03697 | C++ | #inlcude<iostream>
using namespace std;
int main(){
int a,b; cin>>a>>b;
if(a+b<10) cout<<a+b<<endl;
else cout<<"error"<<endl;
return 0;
} | a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
1 | #inlcude<iostream>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:5:12: error: 'cin' was not declared in this scope
5 | int a,b; cin>>a>>b;
| ^~~
a.cc:1:1: note: 'std::cin' is defined... |
s646224597 | p03697 | C++ | #inlcude<iostream>
using namespace std;
int main(){
int a,b; cin>>a>>b;
if(a+B<10) cout<<a+b<<endl;
else cout<<"error"<<endl;
return 0;
} | a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
1 | #inlcude<iostream>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:5:12: error: 'cin' was not declared in this scope
5 | int a,b; cin>>a>>b;
| ^~~
a.cc:1:1: note: 'std::cin' is defined... |
s592450358 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void){
int a,b;
cin>>a>>c;
if(a+b<10)cout<<a+b;
else cout<<"error";
}
| a.cc: In function 'int main()':
a.cc:6:11: error: 'c' was not declared in this scope
6 | cin>>a>>c;
| ^
|
s516330141 | p03697 | C++ | #include <cstdio>
int main(){
int A, B;
scanf("%d%d", &A, &B);
if(X+Y<10) printf("%d\n", X+Y);
else printf("error\n");
return 0;
} | a.cc: In function 'int main()':
a.cc:6:8: error: 'X' was not declared in this scope
6 | if(X+Y<10) printf("%d\n", X+Y);
| ^
a.cc:6:10: error: 'Y' was not declared in this scope
6 | if(X+Y<10) printf("%d\n", X+Y);
| ^
|
s353766202 | p03697 | C | #include <stdio.h>
int main() {
int number_x, number_y;
scanf("%d %d", &number_x, &number_y);
if(number_x + number_y < 10) {
printf("%d\n"number_x + number_y);
} else {
printf("error\n");
}
return 0;
}
| main.c: In function 'main':
main.c:7:18: error: expected ')' before 'number_x'
7 | printf("%d\n"number_x + number_y);
| ~ ^~~~~~~~
| )
|
s845650347 | p03697 | C++ | #include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <numeric>
#include <tuple>
#include <stack>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define print(s) cout << s << endl
typed... | a.cc: In function 'int main()':
a.cc:27:27: error: operands to '?:' have different types 'const char*' and 'int'
27 | cout << (a+b >= 10? "error" : a+b) << endl;
| ~~~~~~~~~^~~~~~~~~~~~~~~
|
s018138619 | p03697 | C++ |
ilist = input().split(" ")
ans = int(ilist[0]) + int(ilist[1] )
if ans >= 10:
print("error")
else :
print(ans) | a.cc:2:1: error: 'ilist' does not name a type
2 | ilist = input().split(" ")
| ^~~~~
|
s557412857 | p03697 | C++ | #include <iostream>
using namespace std;
int main(void){
ina a,b;
cin >> a >> b;
int c = a + b;
if(c >= 10)
cout << "error" << endl;
else
cout << c << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:4:3: error: 'ina' was not declared in this scope; did you mean 'int'?
4 | ina a,b;
| ^~~
| int
a.cc:5:10: error: 'a' was not declared in this scope
5 | cin >> a >> b;
| ^
a.cc:5:15: error: 'b' was not declared in this scope
5 | cin >>... |
s563166463 | p03697 | C++ | #include <iostream>
#include <math.h>
#include <algorithm>
#include <string>
#include <string.h>
#include <queue>
using namespace std;
int main() {
int a,b;
cin>>a>>b;
cout<<((a+b>9)?"error":a+b);
} | a.cc: In function 'int main()':
a.cc:12:23: error: operands to '?:' have different types 'const char*' and 'int'
12 | cout<<((a+b>9)?"error":a+b);
| ~~~~~~~^~~~~~~~~~~~
|
s083803973 | p03697 | C++ | #include <iostream>
#include <math.h>
#include <algorithm>
#include <string>
#include <string.h>
#include <queue>
using namespace std;
int main() {
int a,b;
cin>>a>>b;
cout<<(a+b>9?"error":a+b);
} | a.cc: In function 'int main()':
a.cc:12:21: error: operands to '?:' have different types 'const char*' and 'int'
12 | cout<<(a+b>9?"error":a+b);
| ~~~~~^~~~~~~~~~~~
|
s074076445 | 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:19: error: expected primary-expression before ',' token
10 | cout<<"error"<,endl;
| ^
|
s733626971 | 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;
}
return 0; | a.cc: In function 'int main()':
a.cc:14:12: error: expected '}' at end of input
14 | return 0;
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s610266720 | p03697 | C++ | #include <iostream>
using namespace std;
int main(void){
// Your code here!
int a,b;
cin >> a >> b;
cout<<a+b<10?a+b:"error";
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:14: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and 'int')
7 | cout<<a+b<10?a+b:"error";
| ~~~~~~~~~^~~
| | |
| | int
| std::basic_ostream<char>
a.cc:7:14: note: candidate: 'opera... |
s382304098 | p03697 | C++ | #include<iosteam>
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:1:9: fatal error: iosteam: No such file or directory
1 | #include<iosteam>
| ^~~~~~~~~
compilation terminated.
|
s577349226 | p03697 | C++ | #include<iostream>
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:21: error: operands to '?:' have different types 'const char*' and 'int'
6 | cout << (a+b>=10?"error":a+b) << endl;
| ~~~~~~~^~~~~~~~~~~~
|
s002830866 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void){
int a,b;
cin>>a>>b;
if((a+b)>=10){
cout<<"error"<<endl;
}
else
cout<<a+b<<endl;
}
| a.cc:9:3: error: extended character is not valid in an identifier
9 | cout<<"error"<<endl;
| ^
a.cc: In function 'int main()':
a.cc:9:3: error: '\U00003000cout' was not declared in this scope
9 | cout<<"error"<<endl;
| ^~~~~~
|
s550576240 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void){
int a,b;
cin>>a>>b;
if(a+b){
cout<<"error"<<endl;
}
else
cout<<a+b<<endl;
}
| a.cc:9:3: error: extended character is not valid in an identifier
9 | cout<<"error"<<endl;
| ^
a.cc: In function 'int main()':
a.cc:9:3: error: '\U00003000cout' was not declared in this scope
9 | cout<<"error"<<endl;
| ^~~~~~
|
s807585100 | p03697 | C++ | #include<bits/stdc++.h>
int main(void){
int a,b;
cin>>a>>b;
if(a+b){
cout<<"error"<<endl;
}
else
cout<<a+b<<endl;
} | a.cc:8:3: error: extended character is not valid in an identifier
8 | cout<<"error"<<endl;
| ^
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin>>a>>b;
| ^~~
| std::cin
In file included from /usr/include/x86_64-... |
s013479340 | p03697 | C++ | #include <bits/stdc++.h>
#include <numeric>
#include<iostream>
#include<vector>
#include<algorithm>
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:11:21: error: operands to '?:' have different types 'const char*' and 'int'
11 | cout << (a+b>=10?"error":a+b) << endl;
| ~~~~~~~^~~~~~~~~~~~
|
s039312520 | p03697 | C++ | #include <bits/stdc++.h>
#include <numeric>
#include<iostream>
#include<vector>
#include<algorithm>
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:11:20: error: operands to '?:' have different types 'int' and 'const char*'
11 | cout << (a+b<10?a+b:"error") << endl;
| ~~~~~~^~~~~~~~~~~~
|
s647234015 | p03697 | C++ | #include <iostream>
int main()
{
int a,b;
cin >> a >> b;
if(a+b>=10)
{
cout << "error" << endl;
return 0;
}
cout << a+b << endl;
} | a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin >> a >> b;
| ^~~
| 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 t... |
s448946251 | p03697 | C++ | #include <iostream>
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:21: error: operands to '?:' have different types 'const char*' and 'int'
6 | cout << (a+b > 10 ? "error" : a+b) << endl;
| ~~~~~~~~~^~~~~~~~~~~~~~~
|
s383214811 | p03697 | Java | import java.util.*;
class Main{
public static main(String[] args){
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
int b=sc.nextInt();
System.out.println(a+b>=10?"error":a+b);
}
} | Main.java:3: error: invalid method declaration; return type required
public static main(String[] args){
^
1 error
|
s845149687 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int A,B;
cin>>X>>A>>B;
if(A+B>=10) cout<<"error";
else cout<<A+B;
} | a.cc: In function 'int main()':
a.cc:6:8: error: 'X' was not declared in this scope
6 | cin>>X>>A>>B;
| ^
|
s573921516 | p03697 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
if(a+b>9)cour<<a+b;
else cout<<"error";
} | a.cc: In function 'int main()':
a.cc:6:12: error: 'cour' was not declared in this scope
6 | if(a+b>9)cour<<a+b;
| ^~~~
|
s975397965 | p03697 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<((a+b>9)? a+b:"error");
} | a.cc: In function 'int main()':
a.cc:6:17: error: operands to '?:' have different types 'int' and 'const char*'
6 | cout<<((a+b>9)? a+b:"error");
| ~~~~~~~^~~~~~~~~~~~~
|
s066173131 | p03697 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<(a+b>9 ? a+b:"error");
} | a.cc: In function 'int main()':
a.cc:6:16: error: operands to '?:' have different types 'int' and 'const char*'
6 | cout<<(a+b>9 ? a+b:"error");
| ~~~~~~^~~~~~~~~~~~~
|
s443459348 | p03697 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<(a+b>9? a+b:"error");
} | a.cc: In function 'int main()':
a.cc:6:15: error: operands to '?:' have different types 'int' and 'const char*'
6 | cout<<(a+b>9? a+b:"error");
| ~~~~~^~~~~~~~~~~~~
|
s201749595 | p03697 | C++ | #include<iostream>
#include<stdio.h>
#include<string.h>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<iomanip>
#define REP(i,n) for (int i = 0; (i) < (n); ++ (i))
using namespace std;
int a,b;
int main(){
cin >> a >> b >> c;
int ans = a+b;
if(ans>=10){
cout<< "... | a.cc: In function 'int main()':
a.cc:19:20: error: 'c' was not declared in this scope
19 | cin >> a >> b >> c;
| ^
|
s625391611 | p03697 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<(a+b<=9?a+b:"error")<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:16: error: operands to '?:' have different types 'int' and 'const char*'
7 | cout<<(a+b<=9?a+b:"error")<<endl;
| ~~~~~~^~~~~~~~~~~~
|
s662393981 | p03697 | C++ | #include <ctype.h>
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
if(a+b>=10)cout << "error" << endl;
else << a+b << endl;
} | a.cc: In function 'int main()':
a.cc:9:8: error: expected primary-expression before '<<' token
9 | else << a+b << endl;
| ^~
|
s234639864 | p03697 | C++ | #include<bits/stdc++.h>
#include<algorithm>
using namespace std;
#define str string
#define rep(x,y) for(int i=x;i<y;i++)
#define REP(x,y) for(int j=x;j<y;j++)
#define all(x) x.begin(),x.end()
#define int long long
signed main(){
int N,K,B;
vector<int>a={0,1,3,1,2,1,2,1,1,2,1,2,1};
str S1,S2,S3;
cin>>N>>K;
c... | a.cc: In function 'int main()':
a.cc:14:17: error: operands to '?:' have different types 'long long int' and 'const char*'
14 | cout<<(N+K<=10?N+K:"error");
| ~~~~~~~^~~~~~~~~~~~
|
s940267617 | p03697 | C++ | #include<bits/stdc++.h>
#include<algorithm>
using namespace std;
#define str string
#define rep(x,y) for(int i=x;i<y;i++)
#define REP(x,y) for(int j=x;j<y;j++)
#define all(x) x.begin(),x.end()
#define int long long
signed main(){
double N,K,B;
vector<int>a={0,1,3,1,2,1,2,1,1,2,1,2,1};
str S1,S2,S3;
cin>>N>>K;
... | a.cc: In function 'int main()':
a.cc:14:17: error: operands to '?:' have different types 'double' and 'const char*'
14 | cout<<(N+K<=10?N+K:"error");
| ~~~~~~~^~~~~~~~~~~~
|
s671458344 | 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:8:23: error: operands to '?:' have different types 'int' and 'const char*'
8 | cout << (a + b < 10 ? a + b : "error") << endl;
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
s273129891 | 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:6:22: error: operands to '?:' have different types 'int' and 'const char*'
6 | cout<<(a+b<10?a+b:"error")<<endl;
| ~~~~~~^~~~~~~~~~~~
|
s505517123 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<(a+b>9)?(a+b):"error"<<endl;
}
| a.cc: In function 'int main()':
a.cc:6:36: error: invalid operands of types 'const char [6]' and '<unresolved overloaded function type>' to binary 'operator<<'
6 | cout<<(a+b>9)?(a+b):"error"<<endl;
| ~~~~~~~^~~~~~
|
s978993971 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int maiN(){
int a,b;
cin>>a>>b;
cout<<(a+b>9?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>9?a+b:"error")<<endl;
| ~~~~~^~~~~~~~~~~~
a.cc:7:1: warning: no return statement in function returning non-void [-Wreturn-type]
7 | }
| ^
|
s502453367 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<(a+b>9)?a+b:"error"<<endl;
}
| a.cc: In function 'int main()':
a.cc:6:34: error: invalid operands of types 'const char [6]' and '<unresolved overloaded function type>' to binary 'operator<<'
6 | cout<<(a+b>9)?a+b:"error"<<endl;
| ~~~~~~~^~~~~~
|
s508828132 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int maiN(){
int a,b;
cin>>a>>b;
cout<<(a+b>9?)a+b:"error"<<endl;
}
| a.cc: In function 'int maiN()':
a.cc:6:22: error: expected primary-expression before ')' token
6 | cout<<(a+b>9?)a+b:"error"<<endl;
| ^
a.cc:6:22: error: expected ':' before ')' token
6 | cout<<(a+b>9?)a+b:"error"<<endl;
| ^
| ... |
s761708954 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int maiN(){
int a,b;
cin>>a>>b;
cout<<(a+b>9?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>9?a+b:"error")<<endl;
| ~~~~~^~~~~~~~~~~~
a.cc:7:1: warning: no return statement in function returning non-void [-Wreturn-type]
7 | }
| ^
|
s956644242 | 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:19: error: operands to '?:' have different types 'const char*' and 'int'
8 | cout << (A+B>=10?"error":A+B) << endl;
| ~~~~~~~^~~~~~~~~~~~
|
s509197672 | 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;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:28: error: operands to '?:' have different types 'const char*' and 'int'
6 | cout << (((a + b) >= 10 )? "error" : a + b) << endl;
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
s866294903 | 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;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:26: error: operands to '?:' have different types 'const char*' and 'int'
6 | cout << ((a + b) >= 10 ? "error" : a + b) << endl;
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
s341234543 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<(a+b>9?"error":a+b)<<endl;
}
| a.cc: In function 'int main()':
a.cc:6:15: error: operands to '?:' have different types 'const char*' and 'int'
6 | cout<<(a+b>9?"error":a+b)<<endl;
| ~~~~~^~~~~~~~~~~~
|
s468789769 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a<<b;
cout<<(a+b>9?"error":a+b)<<endl;
}
| a.cc: In function 'int main()':
a.cc:5:9: error: no match for 'operator<<' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
5 | cin>>a<<b;
| ~~~~~~^~~
| | |
| | int
| std::basic_istream<char>::__istream_type {a... |
s187677581 | p03697 | C++ | #include<iostream>
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:6:16: error: expected primary-expression before '>' token
6 | if(a+b=>10)cout<<"error"<<endl;
| ^
|
s833163117 | p03697 | C++ | #include <cmath>
#include <iostream>
#include <stdio.h>
#include <string>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <set>
#include <limits.h>
#include <map>
#include <numeric>
namespace test {
std::string to_string (char val) {
return std::string (1, val);
// return std... | a.cc: In function 'int main()':
a.cc:27:31: error: operands to '?:' have different types 'const char*' and 'int'
27 | cout << ( a + b >= 10 ? "error" : a + b) << endl;
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
s438093784 | p03697 | C++ | #include <iostream>
using namespace std;
int main (){
int a, b;
cin >> a >> b;
if((a+b)>=){
cout << "error" << endl;
}else{
cout << a+b << endl;
}
} | a.cc: In function 'int main()':
a.cc:7:15: error: expected primary-expression before ')' token
7 | if((a+b)>=){
| ^
|
s563317319 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin a >> b;
if( a+b > 9){
cout << "error" << endl;
}
else{
cout << a + b << endl;
}
}
| a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'a'
6 | cin a >> b;
| ^~
| ;
|
s703268230 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin a>>b;
if(a+b>9){
cout << "error" << endl;
}
else{
cout << a+b << endl;
}
}
| a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'a'
6 | cin a>>b;
| ^~
| ;
|
s403250153 | p03697 | C++ | using namespace std;
#include<bits/stdc++.h>
#define BEGIN ios_base::sync_with_stdio(0);cin.tie(0);
#define END return EXIT_SUCCESS;
#define FOR(I,A,B) for((I)=(A);(I)<(B);(I)++)
#define REP(I,N) FOR((I),0,(N))
#define UP(I,A,B) for((I)=(A);(I)<=(B);(I)++)
#define DW(I,A,B) for((I)=(A);(I)>=(B);(I)--)
#define IN(P) cin... | a.cc: In function 'void solve()':
a.cc:31:12: error: operands to '?:' have different types 'const char*' and 'int'
31 | OUT(A+B>9?"error":A+B);
| ~~~~~^~~~~~~~~~~~
a.cc:15:23: note: in definition of macro 'OUT'
15 | #define OUT(P) cout<<(P)<<endl
| ^
|
s946877233 | p03697 | C++ | #include "stdafx.h"
#include <algorithm>
#include <array>
#include <vector>
#include <iostream>
#include <fstream>
#include <string>
#include <cmath>
#include <functional>
#include <queue>
//AtCoderC++.cpp
using namespace std;
template<typename T> void Show(vector<vector<T>> v) {
for (int i = 0; i < v.size(); i++) ... | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s986518542 | p03697 | C++ | #include "stdafx.h"
#include <algorithm>
#include <array>
#include <vector>
#include <iostream>
#include <fstream>
#include <string>
#include <cmath>
#include <functional>
#include <queue>
//AtCoderC++.cpp
using namespace std;
template<typename T> void Show(vector<vector<T>> v) {
for (int i = 0; i < v.size(); i++) ... | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s456231456 | p03697 | C++ | #include "stdafx.h"
#include <algorithm>
#include <array>
#include <vector>
#include <iostream>
#include <fstream>
#include <string>
#include <cmath>
#include <functional>
#include <queue>
//AtCoderC++.cpp
using namespace std;
template<typename T> void Show(vector<vector<T>> v) {
for (int i = 0; i < v.size(); i++) ... | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s882418737 | p03697 | C++ | #include <iostream>
using namespace std;
int main(){
int a, b;
cin >> a >> b;
cout << (a+b<10 ? a+b : "error");
return 0;
} | a.cc: In function 'int main()':
a.cc:7:19: error: operands to '?:' have different types 'int' and 'const char*'
7 | cout << (a+b<10 ? a+b : "error");
| ~~~~~~~^~~~~~~~~~~~~~~
|
s402927146 | p03697 | C | #include <bits/stdc+;.h>
using namespace std;
int main(int argc, char const *argv[])
{
int a,b,c;
cin >> a >> b;
c = a + b;
if(c < 10) cout << c <, endl;
else cout <<"error" << endl;
return 0;
} | main.c:1:10: fatal error: bits/stdc+;.h: No such file or directory
1 | #include <bits/stdc+;.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s511080219 | p03697 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#define For(i, n) for(int i = 0; i < (n); i ++)
#define Range(c) c.begin(), c.end()
#define RevRange(c) c.begin(), c.end()
#define Cin(T, x) T x; cin >> x;
#define Cins(T, n, xs) vector<T> xs(n); For(i, n) cin >> xs[i];
#define Cout(val) cout ... | a.cc: In function 'int main()':
a.cc:21:3: error: 'else' without a previous 'if'
21 | else Cout(a+b);
| ^~~~
|
s950003810 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
int a,b;cin>>a>>b;cout<<(a+b<=9?a+b:"error")<<endl;
} | a.cc: In function 'int main()':
a.cc:4:36: error: operands to '?:' have different types 'int' and 'const char*'
4 | int a,b;cin>>a>>b;cout<<(a+b<=9?a+b:"error")<<endl;
| ~~~~~~^~~~~~~~~~~~
|
s050946587 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n,m;
cin>>n>>m;
cout<<(n+m>=10?"error":n+m)<<endl;;
}
| a.cc: In function 'int main()':
a.cc:6:17: error: operands to '?:' have different types 'const char*' and 'int'
6 | cout<<(n+m>=10?"error":n+m)<<endl;;
| ~~~~~~~^~~~~~~~~~~~
|
s625112542 | p03697 | C++ | #include <iostream>
using namespace std;
int main(){
int a, b;
cin >> a >> b;
cout << (a+b<10?(a+b):"error") << '\n';
return 0;
} | 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") << '\n';
| ~~~~~~^~~~~~~~~~~~~~
|
s786308052 | p03697 | C++ | #include <iostream>
using namespace std;
int main(){
int a, b;
cin >> a >> b;
cout << (a+b<10?a+b:"error") << '\n';
return 0;
} | 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") << '\n';
| ~~~~~~^~~~~~~~~~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.