submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s813364069 | p00002 | C++ | #include <bits/stdc++.h>
#include <cstdio>
using namespace std;
int a;
int b;
int main() {
while (cin >> a >> b , != EOF) {
int i;
a = a + b;
while(a > 0) {
a = a / 10;
++i;
}
cout << i << endl;
}
} | a.cc: In function 'int main()':
a.cc:9:26: error: expected primary-expression before '!=' token
9 | while (cin >> a >> b , != EOF) {
| ^~
|
s314111665 | p00002 | C++ | #include <bits/stdc++.h>
#include <cstdio>
using namespace std;
int a;
int b;
int main() {
while (cin >> a >> b != EOF) {
int i;
a = a + b;
while(a > 0) {
a = a / 10;
++i;
}
cout << i << endl;
}
} | a.cc: In function 'int main()':
a.cc:9:24: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
9 | while (cin >> a >> b != EOF) {
| ~~~~~~~~~~~~~ ^~
| |
| std::basi... |
s733974486 | p00002 | C++ | #include <bits/stdc++.h>
#include <cstdio>
using namespace std;
int a;
int b;
int main() {
while (c != EOF) {
c = dainyuu()
int i;
a = a + b;
while(a > 0) {
a = a / 10;
++i;
}
cout << i << endl;
}
}
int dainyuu() {
cin >> a >> b;
} | a.cc: In function 'int main()':
a.cc:9:10: error: 'c' was not declared in this scope
9 | while (c != EOF) {
| ^
a.cc:10:9: error: 'dainyuu' was not declared in this scope
10 | c = dainyuu()
| ^~~~~~~
a.cc:15:9: error: 'i' was not declared in this scope
15 | ++i;
... |
s924078590 | p00002 | C++ | #include <bits/stdc++.h>
#include <cstdio>
using namespace std;
int a;
int b;
int main() {
while (c != EOF) {
c = dainyuu();
int i;
a = a + b;
while(a > 0) {
a = a / 10;
++i;
}
cout << i << endl;
}
}
int dainyuu() {
cin >> a >> b;
} | a.cc: In function 'int main()':
a.cc:9:10: error: 'c' was not declared in this scope
9 | while (c != EOF) {
| ^
a.cc:10:9: error: 'dainyuu' was not declared in this scope
10 | c = dainyuu();
| ^~~~~~~
a.cc: In function 'int dainyuu()':
a.cc:25:1: warning: no return statement in... |
s052274968 | p00002 | C++ | #include <bits/stdc++.h>
#include <cstdio>
using namespace std;
int a;
int b;
c = dainyuu()
int main() {
while (c != EOF) {
dainyuu();
int i;
a = a + b;
while(a > 0) {
a = a / 10;
++i;
}
cout << i << endl;
}
}
int dainyuu() {
cin >> a >> b;
} | a.cc:7:1: error: 'c' does not name a type
7 | c = dainyuu()
| ^
a.cc: In function 'int dainyuu()':
a.cc:26:1: warning: no return statement in function returning non-void [-Wreturn-type]
26 | }
| ^
|
s762924887 | p00002 | C++ | #include <bits/stdc++.h>
#include <cstdio>
using namespace std;
int a,b,c;
c = dainyuu()
int main() {
while (c != EOF) {
dainyuu();
int i;
a = a + b;
while(a > 0) {
a = a / 10;
++i;
}
cout << i << endl;
}
}
int dainyuu() {
cin >> a >> b;
} | a.cc:6:1: error: 'c' does not name a type
6 | c = dainyuu()
| ^
a.cc: In function 'int dainyuu()':
a.cc:25:1: warning: no return statement in function returning non-void [-Wreturn-type]
25 | }
| ^
|
s832578927 | p00002 | C++ | #include <bits/stdc++.h>
#include <cstdio>
using namespace std;
int a,b,c;
c = dainyuu();
int main() {
while (c != EOF) {
int i;
a = a + b;
while(a > 0) {
a = a / 10;
++i;
}
cout << i << endl;
}
}
int dainyuu() {
cin >> a >> b;
} | a.cc:6:1: error: 'c' does not name a type
6 | c = dainyuu();
| ^
a.cc: In function 'int dainyuu()':
a.cc:24:1: warning: no return statement in function returning non-void [-Wreturn-type]
24 | }
| ^
|
s369362631 | p00002 | C++ | #include <bits/stdc++.h>
#include <cstdio>
using namespace std;
int a,b;
int main() {
while (dainyuu() != EOF) {
int i;
a = a + b;
while(a > 0) {
a = a / 10;
++i;
}
cout << i << endl;
}
}
void dainyuu() {
cin >> a >> b;
} | a.cc: In function 'int main()':
a.cc:8:10: error: 'dainyuu' was not declared in this scope
8 | while (dainyuu() != EOF) {
| ^~~~~~~
|
s861792764 | p00002 | C++ | #include <bits/stdc++.h>
#include <cstdio>
using namespace std;
int a,b;
int main() {
while (dainyuu() != EOF) {
int i;
a = a + b;
while(a > 0) {
a = a / 10;
++i;
}
cout << i << endl;
}
}
int dainyuu() {
cin >> a >> b;
} | a.cc: In function 'int main()':
a.cc:8:10: error: 'dainyuu' was not declared in this scope
8 | while (dainyuu() != EOF) {
| ^~~~~~~
a.cc: In function 'int dainyuu()':
a.cc:23:1: warning: no return statement in function returning non-void [-Wreturn-type]
23 | }
| ^
|
s871977121 | p00002 | C++ | #include <cstdio>
??????
#define MAX 1000000
#define MIN 0
#define SIZE 200
??????
int main() {
??int i,j;
??int a,b;
??int cnt = 0;
??int buf = 0;
??int sets[SIZE];
??????
??while(scanf("%d %d",&a,&b) != EOF) {
????if((a < MIN) || (b > MAX)) {
??????continue;
????}
????????
????sets[cnt] = a + b;
????++cnt;
??}
????
?... | a.cc:2:1: error: expected unqualified-id before '?' token
2 | ??????
| ^
|
s437770410 | p00002 | C++ | #include<bits/stdc++.h>
#define ll long long int
#define FOR(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define REP(i,n) FOR(i,0,n)
#define REP1(i,n) FOR(i,1,n)
using namespace std;
/*temp*/
int main(){
int i, j;
while(cin >> i >> j){
int n = 0;
i += j;
while(i > 0){
i /= 10;
... | a.cc: In function 'int main()':
a.cc:19:13: error: 'n' was not declared in this scope
19 | cout << n << '\n';
| ^
|
s166931348 | p00002 | C++ | #include<stdio.h>
#include<iostream>
using namespace std;
int main(){
int a = 0, b = 0;
int v;
int i = 0;
while (scanf_s("%d %d",&a,&b)!= EOF){
int c = a + b;
if (a + b < 10){
cout << "1" << endl;
}
else if (a + b < 100){
cout << "2" << endl;
}
else if (a + b < 1000){
cout << "3" << endl;
}
... | a.cc: In function 'int main()':
a.cc:8:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
8 | while (scanf_s("%d %d",&a,&b)!= EOF){
| ^~~~~~~
| scanf
|
s334543027 | p00002 | C++ | #include<iostream>
using namespace std;
int main()
{
int a, b;
while (cin>>a>>b)
{
char s[7];
sprintf_s(s, "%d", a + b);
cout << strlen(s) << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:17: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'?
10 | sprintf_s(s, "%d", a + b);
| ^~~~~~~~~
| sprintf
a.cc:11:25: error: 'strlen' was not declared in this scope
11 | c... |
s894104660 | p00002 | C++ | #include<iostream>
using namespace std;
int main()
{
int a, b;
while (cin>>a>>b)
{
char s[7];
sprintf(s, "%d", a + b);
cout << strlen(s) << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:25: error: 'strlen' was not declared in this scope
11 | cout << strlen(s) << endl;
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostrea... |
s012547420 | p00002 | C++ | #include <iostream>
using namespace std;
int c = 0;
void keta(int C) {
if (C > 9) {
c++;
keta(C/10);
}
return;
}
int main()
{
while (1) {
if (cin.eof)
break;
c = 0;
int A, B,C;
cin >> A>> B;
C = A + B;
keta(C);
c++;
cout << c<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:17:28: error: cannot convert 'std::basic_ios<char>::eof' from type 'bool (std::basic_ios<char>::)() const' to type 'bool'
17 | if (cin.eof)
| ^
|
s554668240 | p00002 | C++ | #include<iostream>
#include<string.h>
using namespace std;
int main(){
int a,b,c;
char ans[10];
cin>>a>>b;
ans=(char)a+b;
c=strlen(ans);
cout<<c<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:4: error: incompatible types in assignment of 'int' to 'char [10]'
8 | ans=(char)a+b;
| ~~~^~~~~~~~~~
|
s539195484 | p00002 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
int a, b;
while(cin >> a >> b){
a = log10(a + b) + 1;
cout << a << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:21: error: 'log10' was not declared in this scope
9 | a = log10(a + b) + 1;
| ^~~~~
|
s218627255 | p00002 | C++ | #include <iostream>
using namespace std;
int main() {
int x, y, count;
cin >> x >> y;
char ch[] = (char)(x + y);
for(int i = 0; ch[i] == '\0'; ++i) {
++count;
}
cout << count << endl;
} | a.cc: In function 'int main()':
a.cc:8:15: error: initializer fails to determine size of 'ch'
8 | char ch[] = (char)(x + y);
| ^~~~~~~~~~~~~
a.cc:8:15: error: array must be initialized with a brace-enclosed initializer
|
s554534580 | p00002 | C++ | #include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main()
{
int a, b, c, d;
char s[10000];
scanf("%d %d", &a, &b);
c = a + b;
itoa(c ,s , 10);
d = strlen(s);
printf("%d", d);
return 0;
} | a.cc: In function 'int main()':
a.cc:10:5: error: 'itoa' was not declared in this scope
10 | itoa(c ,s , 10);
| ^~~~
|
s156686775 | p00002 | C++ | #include <iostream>
using namespace std;
int main(){
int a,b,sum=0;
cin>>a>>b;
sum=a+b;
if(sum<10)cout<<"1"<<endl;
else if(sum<100)cout<<"2"<<endl;
else if(sum<1000)cout<<"3"<<endl;
else if(sum<10000)cout<<"4"<<endl;
else if(sum<100000)cout<<"5"<<endl;
else if(sum<1000000)cout<<"6"<<... | a.cc: In function 'int main()':
a.cc:14:23: error: 'out' was not declared in this scope
14 | else if(sum<100000000)out<<"8"<<endl;
| ^~~
|
s858021054 | p00002 | C++ | #include <iostream>
using namespace std;
int main(){
int a,b,sum=0,count;
while(cin>>a>>b){
count++:
sum=a+b;
if(sum<10)cout<<"1"<<endl;
else if(sum<100)cout<<"2"<<endl;
else if(sum<1000)cout<<"3"<<endl;
else if(sum<10000)cout<<"4"<<endl;
else if(sum<10000... | a.cc: In function 'int main()':
a.cc:6:16: error: expected ';' before ':' token
6 | count++:
| ^
| ;
|
s181400719 | p00002 | C++ | #include <iostream>
#include <cmath>
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int a,b,c,ans;
while(cin >> a >> b;){
c = a + b;
ans = (int)log10((double)c) + 1;
cout << ans << "\n";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:28: error: expected ')' before ';' token
11 | while(cin >> a >> b;){
| ~ ^
| )
a.cc:11:29: error: expected primary-expression before ')' token
11 | while(cin >> a >> b;){
| ... |
s453938941 | p00002 | C++ | #include<iostream>
using namespace std;
int main()
{
int a,b;
int c[200][2]
for(int i=0;i<200,i++)
{
c[i][0]=a;
c[i][1]=b;
cin>>a>>b;
}
for(int j=0;j<200,j++)
{
if(c[j][1]+c[j][1]<10)
{
cout<<1<<endl;
}
else if(c[j][0]+c[j][1]<100)
{
cout<<2<<endl;
}
else if(c[j][0]+c[j][1]<1000)
{
cout<<3<<endl;
}
else if(c[j][0]+c... | a.cc: In function 'int main()':
a.cc:7:1: error: expected initializer before 'for'
7 | for(int i=0;i<200,i++)
| ^~~
a.cc:7:13: error: 'i' was not declared in this scope
7 | for(int i=0;i<200,i++)
| ^
a.cc:13:22: error: expected ';' before ')' token
13 | for(int j=0;j<200,j++)
| ... |
s803275530 | p00002 | C++ | #include<iostream>
using namespace std;
int main()
{
int a,b,i;
i=0;
while(cin>>a>>b;)
{
cin>>a>>b;
if(a+b<10)
{
cout<<1<<endl;
}
else if(a+b<100)
{
cout<<2<<endl;
}
else if(a+b<1000)
{
cout<<3<<endl;
}
else if(a+b<10000)
{
cout<<4<<endl;
}
else if(a+b<100000)
{
cout<<5<<endl;
}
else if(a+b<1000000)
{
cout<<6<<e... | a.cc: In function 'int main()':
a.cc:7:16: error: expected ')' before ';' token
7 | while(cin>>a>>b;)
| ~ ^
| )
a.cc:7:17: error: expected primary-expression before ')' token
7 | while(cin>>a>>b;)
| ^
|
s656639889 | p00002 | C++ | int main()
{
int a, b,sum,n;
n = 0;
while (cin >> a >> b)
{
sum = a + b;
for (;;)
{
sum = sum / 10;
n = n + 1;
if (sum == 0)
{
break;
}
}
cout << n << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:16: error: 'cin' was not declared in this scope
7 | while (cin >> a >> b)
| ^~~
a.cc:22:17: error: 'cout' was not declared in this scope
22 | cout << n << endl;
| ^~~~
a.cc:22:30: error: 'endl' was not decla... |
s462197292 | p00002 | C++ | #include<stdio.h>
int main(void)
{
int a,b,i,n;
scanf("%d %d",&a,&b);
a=a+b;
for(i=1;i<8;i++){
if(a<10){
break;
}
a=a/10
}
printf("%d\n",i);
return 0;
} | a.cc: In function 'int main()':
a.cc:11:23: error: expected ';' before '}' token
11 | a=a/10
| ^
| ;
12 | }
| ~
|
s566581806 | p00002 | C++ | #include <vector>
#ifndef EOF
#define EOF (-1)
#endif
int main() {
std::vector<int> digits;
int a, b;
while (scanf("%d %d", &a, &b) != EOF)
{
int sum = a + b;
int t = sum / 10;
int digit = 0;
while (t > 0) {
digit ++;
t = t / 10;
}
... | a.cc: In function 'int main()':
a.cc:10:12: error: 'scanf' was not declared in this scope
10 | while (scanf("%d %d", &a, &b) != EOF)
| ^~~~~
a.cc:23:14: error: 'cout' is not a member of 'std'
23 | std::cout << digits[i] << std::endl;
| ^~~~
a.cc:2:1: note: 'std::cou... |
s982042241 | p00002 | C++ | k | a.cc:1:1: error: 'k' does not name a type
1 | k
| ^
|
s395049522 | p00002 | C++ | #include<iostream>
#include<vector>
#include<map>
#include<string>
using namespace std;
int get_digit(int num);
int main() {
int first;
int second;
int data_cnt = 0;
std::vector<int> inputs;
while ((cin >> first >> second) || (data_cnt < 200)) {
data_cnt++;
inputs.push_back(first + second);
}
for (int i ... | a.cc: In function 'std::string to_string(const T&)':
a.cc:33:28: error: 'stm' has incomplete type
33 | std::ostringstream stm;
| ^~~
In file included from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/... |
s027261794 | p00002 | C++ | #include<iostream>
#include<vector>
#include<map>
#include<string>
using namespace std;
int get_digit(int num);
template < typename T > std::string to_string(const T& n)
{
std::ostringstream stm;
stm << n;
return stm.str();
}
int main() {
int first;
int second;
int data_cnt = 0;
std::vector<int> inputs;
whi... | a.cc: In function 'std::string to_string(const T&)':
a.cc:11:28: error: 'stm' has incomplete type
11 | std::ostringstream stm;
| ^~~
In file included from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/... |
s885543029 | p00002 | C++ | #include<iostream>
#include<vector>
#include<map>
#include<string>
using namespace std;
int get_digit(int num);
int main() {
int first;
int second;
int data_cnt = 0;
std::vector<int> inputs;
while ((cin >> first >> second) || (data_cnt < 200)) {
data_cnt++;
inputs.push_back(first + second);
}
for (int i ... | a.cc: In function 'int get_digit(int)':
a.cc:28:16: error: 'log10' was not declared in this scope
28 | return log10(num) + 1;
| ^~~~~
|
s478480406 | p00002 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int x,y;
for(;;){
cin >> x >> y;
if(cin.eof()) break;
cout << to_string(a+b).length() << "\n";
}
} | a.cc: In function 'int main()':
a.cc:11:27: error: 'a' was not declared in this scope
11 | cout << to_string(a+b).length() << "\n";
| ^
a.cc:11:29: error: 'b' was not declared in this scope
11 | cout << to_string(a+b).length() << "\n";
| ... |
s169811057 | p00002 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int x,y;
for(;;){
cin >> x >> y;
if(cin.eof()) break;
cout << to_string(x+y).length() << "\n";
}
}
template < typename T > std::string to_string( const T& n ){
... | a.cc: In function 'std::string to_string(const T&)':
a.cc:15:24: error: 'stm' has incomplete type
15 | std::ostringstream stm ;
| ^~~
In file included from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iost... |
s905148646 | p00002 | C++ | fn main(){
loop{
let mut buf = String::new();
let _ = io::stdin().read_line(&mut buf);
if buf == "" { break; }
let v: Vec<_> = buf.split_whitespace().collect();
let a: i32 = v[0].parse().unwrap();
let b: i32 = v[1].parse().unwrap();
println!("{}", (a + b).to_s... | a.cc:17:2: error: invalid preprocessing directive #[
17 | #[allow(unused_imports)]
| ^
a.cc:19:2: error: invalid preprocessing directive #[
19 | #[allow(unused_imports)]
| ^
a.cc:31:14: error: too many decimal points in number
31 | for _ in 0..n {
| ^~~~
a.cc:1:1: error: 'f... |
s702046038 | p00002 | C++ |
fn main() {
let n = readln();
let mut c:f32 = 100000.0;
for _i in 0..n {
c=c+c*0.05;
if c%1000.0!=0.0{
c=(((c/1000.0) as i32) as f32)*1000.0+1000.0;
}
}
println!("{:.0}",c);
}
// --- template ---
#[allow(unused_i... | a.cc:6:19: error: too many decimal points in number
6 | for _i in 0..n {
| ^~~~
a.cc:16:6: error: invalid preprocessing directive #[
16 | #[allow(unused_imports)]
| ^
a.cc:18:6: error: invalid preprocessing directive #[
18 | #[allow(unused_imports)]
| ... |
s117552326 | p00002 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s182368798 | p00002 | C++ | #include<iostream>
using namespace std;
int main()
{
int a, b, i = 10;
while (cin >> a >> b) {
for (int j = 1;; j++) {
if (a + b < pow(10, j)) {
cout << j << endl;
break;
}
}
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:37: error: 'pow' was not declared in this scope
9 | if (a + b < pow(10, j)) {
| ^~~
|
s363801847 | p00002 | C++ | #include<iostream>
using namespace std;
int main()
{
int a, b, i = 10;
while (cin >> a >> b) {
for (int j = 1;; j++) {
if (a + b < pow(10, j)) {
cout << j << endl;
break;
}
}
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:37: error: 'pow' was not declared in this scope
9 | if (a + b < pow(10, j)) {
| ^~~
|
s756166850 | p00002 | C++ | #include <iostream>
#include <sstream>
#include <string>
using namespace std;
void readData(vector<string>& input_data){
}
int perseString(string line) {
stringstream ss;
ss << line;
int a, b;
ss >> a >> b;
return a + b;
}
int countDigit(int n){
int cnt = 1;
while(n /= 10)
++c... | a.cc:7:6: error: variable or field 'readData' declared void
7 | void readData(vector<string>& input_data){
| ^~~~~~~~
a.cc:7:15: error: 'vector' was not declared in this scope
7 | void readData(vector<string>& input_data){
| ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in heade... |
s771189150 | p00002 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main(){
vector<int> sum;
vector<string> truss;
int a,b;
while(cin >> a >> b){
int num = a + b;
int count = 0;
while(num){
count++;
num /= 10;
}
cout << count << endl;
}
/*
sum.push... | a.cc:26:3: error: expected unqualified-id before 'return'
26 | return 0;
| ^~~~~~
a.cc:27:1: error: expected declaration before '}' token
27 | }
| ^
|
s379686093 | p00002 | C++ | #include<stdio.h>
#include<math.h>
int main() {
double a, b;
while (scanf("%d %d", &a, &b)){
printf("%d\n",(int)log10(double)(a+b) + 1);
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:42: error: expected primary-expression before 'double'
7 | printf("%d\n",(int)log10(double)(a+b) + 1);
| ^~~~~~
|
s062259604 | p00002 | C++ | #include<iostream>
using namespace std;
int main(){
int a, b;
int sum, digit;
while(cin >> a >> b){
sum = a + b;
digit = 0;
while(sum){
sum = sum \ 10;
digit++;
};
cout << digit << endl;
};
return 0;
}
| a.cc:12:23: error: stray '\' in program
12 | sum = sum \ 10;
| ^
a.cc: In function 'int main()':
a.cc:12:22: error: expected ';' before numeric constant
12 | sum = sum \ 10;
| ^ ~~
| ;
|
s538516719 | p00002 | C++ | #include<iostream>
using namespace std;
int main(){
int a, b, sum, digit;
while(cin >> a >> b){
sum = a + b;
digit = 0;
while(digit){
sum = sum \ 10;
digit++;
}
if(digit == 0){ digit = 1; }
cout << digit << endl;
};
return 0;
}
| a.cc:10:23: error: stray '\' in program
10 | sum = sum \ 10;
| ^
a.cc: In function 'int main()':
a.cc:10:22: error: expected ';' before numeric constant
10 | sum = sum \ 10;
| ^ ~~
| ;
|
s979278955 | p00002 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s423694736 | p00002 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s084761147 | p00002 | C++ | #include <iostream>
using namespace std;
int getDigitNumber(int n){
return n > 0 ? 1 + getDigitNumber(n / 10) : 0;
}
int main(int argc, char const *argv[]) {
while(){
int a,b;
cin >> a >> b;
cout << getDigitNumber(a+b) << endl;
}
return 0;
}
| a.cc: In function 'int main(int, const char**)':
a.cc:10:9: error: expected primary-expression before ')' token
10 | while(){
| ^
|
s272197037 | p00002 | C++ |
A = []
B = []
s = True
while(s):
try:
a,b = map(int, input().split())
except ValueError:
break
A.append(a)
B.append(b)
for i in range(len(A)):
sum = A[i] + B[i]
digits = 1
while(sum//10 != 0):
digits += 1
sum //= 10
print(str(digits))
| a.cc:2:1: error: 'A' does not name a type
2 | A = []
| ^
|
s231551134 | p00002 | C++ | #include<iostream>
#include<cstdio>
#include<string>
int main(){
string a, b;
while((cin >> a >> b) != EOF){
printf("%d %d\n", a.length(), b.length());
}
}
| a.cc: In function 'int main()':
a.cc:5:5: error: 'string' was not declared in this scope
5 | string a, b;
| ^~~~~~
a.cc:5:5: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/os... |
s953435854 | p00002 | C++ | #include<iostream>
#include<cstdio>
#include<string>
int main(){
string a, b;
while(cin >> a >> b){
printf("%d %d\n", a.length(), b.length());
}
}
| a.cc: In function 'int main()':
a.cc:5:5: error: 'string' was not declared in this scope
5 | string a, b;
| ^~~~~~
a.cc:5:5: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/os... |
s302375877 | p00002 | C++ | #include<iostream>
#include<cstdio>
#include<string>
int main(){
string a, b;
while(cin >> a){
cin >> b;
printf("%d %d\n", a.length(), b.length());
}
}
| a.cc: In function 'int main()':
a.cc:5:5: error: 'string' was not declared in this scope
5 | string a, b;
| ^~~~~~
a.cc:5:5: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/os... |
s679093028 | p00002 | C++ | #include<iostream>
#include<cstdio>
#include<string>
int main(){
string a, b;
while(cin >> a){
cin >> b;
printf("%d %d\n", a.length(), b.length());
}
}
| a.cc: In function 'int main()':
a.cc:5:5: error: 'string' was not declared in this scope
5 | string a, b;
| ^~~~~~
a.cc:5:5: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/os... |
s541098712 | p00002 | C++ | #include<iostream>
#include<cstdio>
#include<string>
int main(){
int a, b;
while(cin >> a){
cin >> b;
string s = to_string(a+b);
printf("%d\n", s.length());
}
}
| a.cc: In function 'int main()':
a.cc:6:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | while(cin >> a){
| ^~~
| 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; ... |
s060368018 | p00002 | C++ | #include<iostream>
#include<cstdio>
#include<string>
int main(){
int a, b;
while(cin >> a >> b){
//cin >> b;
string s = to_string(a+b);
printf("%d\n", s.length());
}
}
| a.cc: In function 'int main()':
a.cc:6:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | while(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 ci... |
s865283694 | p00002 | C++ | #include<iostream>
#include<cstdio>
#include<string>
int main(){
int a, b;
while(~scanf("%d%d", &a, &b)){
string s = to_string(a+b);
printf("%d\n", s.length());
}
}
| a.cc: In function 'int main()':
a.cc:7:9: error: 'string' was not declared in this scope
7 | string s = to_string(a+b);
| ^~~~~~
a.cc:7:9: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from ... |
s195801040 | p00002 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
long long a,b;
while(cin >> a >> b;){
long long sum = a + b;
string str = to_string(sum);
cout << str.length()<<endl;}
}
| a.cc: In function 'int main()':
a.cc:7:24: error: expected ')' before ';' token
7 | while(cin >> a >> b;){
| ~ ^
| )
a.cc:7:25: error: expected primary-expression before ')' token
7 | while(cin >> a >> b;){
| ^
|
s751147640 | p00002 | C++ | #include<cstdio>
int main(){
int n,n1,n2,count,a;
while(sacnf("%d%d",&n1,&n2)!=EOF){
count=0;
a=n1+n2;
while(a!=0){
a=a/10;
count++;
}
printf("%d",count);
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:4:15: error: 'sacnf' was not declared in this scope; did you mean 'scanf'?
4 | while(sacnf("%d%d",&n1,&n2)!=EOF){
| ^~~~~
| scanf
|
s336864102 | p00002 | C++ | #include <iostream>
using namespace std;
unsigned short digitsofnum(unsigned short n) {
int j = 0;
while (n > 0) {
n = n / 10;
j++;
}
return j;
}
int main()
{
unsigned short a, b;
vector<unsigned short> dst;
while (cin >> a >> b)
cout <<digitsofnum(a + b) << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:14:9: error: 'vector' was not declared in this scope
14 | vector<unsigned short> dst;
| ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
1 | #include <iostream>
+++ |+#include ... |
s185287638 | p00002 | C++ | #coding:UTF-8
a=int(input())
b=int(input())
a+=b;
b=1
for num in range(1,8):
b*=10
if a<b:
print(num)
break
| a.cc:1:2: error: invalid preprocessing directive #coding
1 | #coding:UTF-8
| ^~~~~~
a.cc:3:1: error: 'a' does not name a type
3 | a=int(input())
| ^
a.cc:7:1: error: 'b' does not name a type
7 | b=1
| ^
|
s658117525 | p00002 | C++ | #include "stdafx.h"
#include<iostream>
#include<string>
using namespace std;
int main()
{
int i1, i2;
cin >> i1 >> i2;
i1 += i2;
i2 = 0;
while (i1) {
i2++;
i1 /= 10;
}
cout << i2 << endl;
return 0;
}
| a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s790193457 | p00002 | C++ | #include<iostream>
#include<cmath>
using namespace std;
int main(void){
int a,b;
int ans;
while(1){
cin >> a >> b;
if(a==0 %% b==0)
break;
ans=log10(a+b)+1;
cout << ans << endl;
}
}
| a.cc: In function 'int main()':
a.cc:14:12: error: expected primary-expression before '%' token
14 | if(a==0 %% b==0)
| ^
|
s763212257 | p00002 | C++ | #include<iostream>
using namespace std;
int main (){
int a,b,gou,p,i;
gou=0;
while(cin>>a>>b){
gou=a+b;
for(j=0;j<7;j++){
if(gou>0){
p++;
}
else if(gou<=0){
break;
}
gou=gou/10;
}
cout<<p<<endl;
p=0;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:21: error: 'j' was not declared in this scope
8 | for(j=0;j<7;j++){
| ^
|
s961477864 | p00002 | C++ | import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner cin = new Scanner(System.in);
int a,b;
while(true)
{
a=cin.nextInt();
b=cin.nextInt();
if(a==0 && b==0) break;
String s = ((Integer)(a+b)).toString();
System.out.println(s.length());
}
}
... | 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
| ^~~~~~
|
s591889758 | p00002 | C++ | import java.util.*;public class Main{public static void main(String[]a){Scanner s=new Scanner(System.in);for(int t=s.nextInt();t-->0;){int[]l=new int[3];for(int i=0;i<3;i++)l[i]=s.nextInt();Arrays.sort(l);System.out.println(l[0]*l[0]+l[1]*l[1]==l[2]*l[2]?"YES":"NO");}}} | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;public class Main{public static void main(String[]a){Scanner s=new Scanner(System.in);for(int t=s.nextInt();t-->0;){int[]l=new int[3];for(int i=0;i<3;i++)l[i]=s.nextInt();Arrays.sort(l);System.out.println(l[0]*l[0]+l[1]*l[1]==l[2]*l[2]?"YES":"NO"... |
s472499809 | p00002 | C++ | #include <stdio.h>
int keta();
int kuriagari();
int maxKeta();
int main(void)
{ //statusªEOFðÔµ½çAüÍI¹(ctrl+z)
int a,b,status,digit,temp;
do{
status=scanf("%d%d",&a,&b);
;temp=keta(a,b);
;digit=temp+kuriagari(a,b,temp);
if (status!=EOF){
printf("%d\n",keta(a+b));
}
}while(status!=EOF);
ret... | a.cc: In function 'int main()':
a.cc:12:27: error: too many arguments to function 'int keta()'
12 | ;temp=keta(a,b);
| ~~~~^~~~~
a.cc:3:5: note: declared here
3 | int keta();
| ^~~~
a.cc:13:38: error: too many arguments to function 'int kuriagari()'
13 | ... |
s199959594 | p00002 | C++ | import java.util.*;
class Main{
public static void main(String[] args){
Scanner scn = new Scanner(System.in);
int a,b;
for(;;){
a = scn.nextInt();
b = scn.nextInt();
int i = a + b;
int count = 1;
for(; i>=10;i/=10,count++);
System.out.pr... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:11: error: expected ':' before 'static'
4 | public static void main(String[] args){
| ^~~~~~~
| :
a.cc:4:29: error: '... |
s390748085 | p00002 | C++ | main(a,b){
for(;~scanf("%d%d",&a,&b);puts(&a))
a=log10(a+b)+49;
} | a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | main(a,b){
| ^
|
s349615509 | p00002 | C++ | #include "StdAfx.h"
#include <iostream>
using namespace std;
int main()
{
int a,b;
while(cin>>a>>b){
int k=1,stac=a+b;
while(stac>10){
stac/=10;
k++;
}
cout<<k<<"\n";
}
} | a.cc:1:10: fatal error: StdAfx.h: No such file or directory
1 | #include "StdAfx.h"
| ^~~~~~~~~~
compilation terminated.
|
s720787528 | p00002 | C++ | #include <iostream>
#include <fstream>
using namespace std;
int main()
{
ifstream fin(argc[1]);
int a,b;
int wa;
while( !fin.eof() ) {
int count = 0;
fin >> a >> b;
wa = a + b;
while(0){
if(wa / 10 == 0){
cout << count << endl;
break;
}
wa/=10;
count++;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:22: error: 'argc' was not declared in this scope
7 | ifstream fin(argc[1]);
| ^~~~
|
s315102340 | p00002 | C++ | #include <iostream>
#include <sstream>
#include <string>
using namespace std;
int counts(string num) {
int count = 0;
for (int i = 0; i < ; i++) {
if (num[i] != "0") count++;
}
return count;
}
int main() {
for (int a, b; cin >> a >> b && a && b) {
string stream as;
as << a;
string stream bs;
bs << b;
... | a.cc: In function 'int counts(std::string)':
a.cc:9:29: error: expected primary-expression before ';' token
9 | for (int i = 0; i < ; i++) {
| ^
a.cc:10:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
10 | if (num[i] != "0... |
s369255060 | p00002 | C++ | #include <iostream>
#include <sstream>
#include <string>
using namespace std;
int counts(string num) {
int count = 0;
for (int i = 0; i < size(num); i++) {
if (num[i] != "0") count++;
}
return count;
}
int main() {
for (int a, b; cin >> a >> b && a && b) {
string stream as;
as << a;
string stream bs;
... | a.cc: In function 'int counts(std::string)':
a.cc:10:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
10 | if (num[i] != "0") count++;
a.cc: In function 'int main()':
a.cc:16:47: error: expected ';' before ')' token
16 | for (int a, b; cin >> a >> b && a && ... |
s446055049 | p00002 | C++ | #include <iostream>
using namespace std;
int counts(char[] num) {
int count = 0;
for (int i = 0; i < num.length; i++) {
if (num[i] != "0") count++;
}
return count;
}
int main() {
for (int a, b; cin >> a >> b && a && b) {
char[] as = (char[])a;
char[] bs = (char[])b;
cout << counts(as)+counts(bs) << en... | a.cc:5:19: error: expected ',' or '...' before 'num'
5 | int counts(char[] num) {
| ^~~
a.cc: In function 'int counts(char*)':
a.cc:7:29: error: 'num' was not declared in this scope; did you mean 'enum'?
7 | for (int i = 0; i < num.length; i++) {
| ... |
s716340593 | p00002 | C++ | #include <iostream>
using namespace std;
int main() {
for (int a, b; cin >> a >> b && a && b) {
a += b;
int count = 0;
for (; a > 0; a /= 10)
count++;
cout << count << endl;
}
} | a.cc: In function 'int main()':
a.cc:6:47: error: expected ';' before ')' token
6 | for (int a, b; cin >> a >> b && a && b) {
| ^
| ;
|
s434730427 | p00002 | C++ | #include <iostream>
using namespace std;
int main() {
for (int a, b; cin >> a >> b && a && b) {
a += b;
int count = 0;
for (; a > 0; a /= 10) {
count++;
}
cout << count << endl;
}
} | a.cc: In function 'int main()':
a.cc:6:47: error: expected ';' before ')' token
6 | for (int a, b; cin >> a >> b && a && b) {
| ^
| ;
|
s510646843 | p00002 | C++ | int toLowUnder10(int arg) {
return (10 > arg) ? arg : (toLowUnder10(arg/10) + 1) ;
}
int main (int argc, char *argv[]) {
int a,b;
while (EOF != fscanf(stdin, "%d %d", &a, &b)) {
printf("%d\n", toLowUnder10(a+b));
}
return 0;
} | a.cc: In function 'int main(int, char**)':
a.cc:7:16: error: 'EOF' was not declared in this scope
7 | while (EOF != fscanf(stdin, "%d %d", &a, &b)) {
| ^~~
a.cc:1:1: note: 'EOF' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cst... |
s726398668 | p00002 | C++ | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
while(s.hasNext()) {
int sum = s.nextInt() + s.nextInt();
System.out.println(String.valueOf(sum).length());
}
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s664789068 | p00002 | C++ | import java.util.*;
import static java.util.Arrays.*;
import static java.lang.Math.*;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
while (read()) {
solve();
}
}
static int a, b;
static boolean read() {
if (!sc.hasNextInt()) return false;
a... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import static java.util.Arrays.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodule... |
s987181685 | p00002 | C++ | #include <iostream>
#include <string>
#include <stdio.h>
#include <strstream.h>
#include <math.h>
using namespace std;
int main()
{
string tmp;
int nspace;
do
{
getline(cin,tmp);
if(cin.eof()) break;
nspace=tmp.find(" ");
string astring=tmp.substr(0,nspace);
string bstring=tmp.substr(nspace+1);
istr... | a.cc:4:10: fatal error: strstream.h: No such file or directory
4 | #include <strstream.h>
| ^~~~~~~~~~~~~
compilation terminated.
|
s178716842 | p00002 | C++ | #include <iostream>
#include <string>
#include <strstream.h>
#include <math.h>
using namespace std;
int main()
{
string tmp;
int nspace;
do
{
if(cin.eof()) break;
getline(cin,tmp);
nspace=tmp.find(" ");
string astring=tmp.substr(0,nspace);
string bstring=tmp.substr(nspace+1);
istrstream astr(astring.d... | a.cc:3:10: fatal error: strstream.h: No such file or directory
3 | #include <strstream.h>
| ^~~~~~~~~~~~~
compilation terminated.
|
s398227121 | p00002 | C++ | #include<cstdio>
int main(){
int a,b;
while(scanf("%d%d",&a,&b)){
print("%d\n",a+b);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:2: error: 'print' was not declared in this scope; did you mean 'printf'?
6 | print("%d\n",a+b);
| ^~~~~
| printf
|
s435081306 | p00002 | C++ | #include <stdio.h>
int main(){
int a, b, c;
int keta;
while(cin >> a){
cin >> b;
c=a+b;
keta=1;
while((c/=10)>0) keta++;
printf("%d\n", keta);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
7 | while(cin >> a){
| ^~~
|
s552340068 | p00002 | C++ | #include <iostream>
int main(){
int a, b, c;
int keta;
while(cin >> a){
cin >> b;
c=a+b;
keta=1;
while((c/=10)>0) keta++;
printf("%d\n", keta);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | while(cin >> a){
| ^~~
| 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; ... |
s292880783 | p00002 | C++ | #include <iostream>
int main(){
int a, b, c;
int keta;
while(cin >> a b){
c=a+b;
keta=1;
while((c/=10)>0) keta++;
printf("%d\n", keta);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | while(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; ... |
s830452807 | p00002 | C++ | #include <iostream>
using namespace std;
int main(){
int a, b, c;
int keta;
while(cin >> a){
cin >> b
c=a+b;
keta=1;
while((c/=10)>0) keta++;
printf("%d\n", keta);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:13: error: expected ';' before 'c'
9 | cin >> b
| ^
| ;
10 | c=a+b;
| ~
|
s736872952 | p00002 | C++ | #include <iostream>
using namespace std;
int main(){
int a, b, c;
int keta;
while(cin >> a){
cin >> b
c=a+b;
keta=1;
while((c/=10)>0) keta++;
cout << keta << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:13: error: expected ';' before 'c'
9 | cin >> b
| ^
| ;
10 | c=a+b;
| ~
|
s297721332 | p00002 | C++ | <stdio.h>
main(){
int a,b,i,sum;
while(scanf("%d",&a)!=EOF){
scanf("%d",&b);
sum=a+b;
for(i=1;sum>1;i++)
sum=sum/10;
printf("%d\n",i);
}
return(0);
} | a.cc:1:1: error: expected unqualified-id before '<' token
1 | <stdio.h>
| ^
|
s977695304 | p00002 | C++ | #include<stdio.h>
int main(){
int a,b,c;
while(~scanf("%d%d",&a,&b);){
c=0;
a+=b;
while(a){
a/=10;
c++;
}
printf("%d\n",c);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:5:28: error: expected ')' before ';' token
5 | while(~scanf("%d%d",&a,&b);){
| ~ ^
| )
a.cc:5:29: error: expected primary-expression before ')' token
5 | while(~scanf("%d%d",&a,&b);){
| ... |
s398759931 | p00002 | C++ | #include<stdio.h>
int main(){
char a[21];
char b[21];
int A;
int B;
int i;
int l=1;
fgets(ツ a,sizeof(a),stdinツ );
fgets(ツ b,sizeof(b),stdinツ );
sscanf(a,"%dツ”, &A);
sscanf(b,"%d", &B);
i=A+B;
while(i >= 10){
i=i/10;
l=l+1;
}
printf("%d" ,l);
} | a.cc:11:15: error: extended character is not valid in an identifier
11 | fgets(ツ a,sizeof(a),stdinツ );
| ^
a.cc:11:31: error: extended character is not valid in an identifier
11 | fgets(ツ a,sizeof(a),stdinツ );
| ^
a.cc:12:15: error: exten... |
s209767467 | p00002 | C++ | #include<stdio.h>
int main(){
char a[21];
char b[21];
int A;
int B;
int i;
int l=1;
fgets(a,sizeof(a),stdin);
fgets(b,sizeof(b),stdin);
sscanf(a,"%dツ”, &A);
sscanf(b,"%d", &B);
i=A+B;
while(i >= 10){
i=i/10;
l=l+1;
}
printf("%d" ,l);
} | a.cc:13:18: warning: missing terminating " character
13 | sscanf(a,"%dツ”, &A);
| ^
a.cc:13:18: error: missing terminating " character
13 | sscanf(a,"%dツ”, &A);
| ^~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:14:27: error: expected ')' before ';' to... |
s911301585 | p00002 | C++ | #include<stdio.h>
int main(){
char a[21];
char b[21];
int A;
int B;
int i;
int l=1;
fgets(a,sizeof(a),stdin);
fgets(b,sizeof(b),stdin);
sscanf(a,"%dツ”, &A);
sscanf(b,"%d", &B);
i=A+B;
while(i >= 10){
i=i/10;
l=l+1;
}
printf("%d" ,l);
} | a.cc:13:18: warning: missing terminating " character
13 | sscanf(a,"%dツ”, &A);
| ^
a.cc:13:18: error: missing terminating " character
13 | sscanf(a,"%dツ”, &A);
| ^~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:14:27: error: expected ')' before ';' to... |
s210444745 | p00002 | C++ | #include<stdio.h>
int main(void){
char a[21];
char b[21];
int A;
int B;
int i;
int l=1;
fgets(a,sizeof(a),stdin);
fgets(b,sizeof(b),stdin);
sscanf(a,"%dツ”, &A);
sscanf(b,"%d", &B);
i=A+B;
while(i >= 10){
i=i/10;
l=l+1;
}
printf("%d" ,l);
} | a.cc:13:18: warning: missing terminating " character
13 | sscanf(a,"%dツ”, &A);
| ^
a.cc:13:18: error: missing terminating " character
13 | sscanf(a,"%dツ”, &A);
| ^~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:14:27: error: expected ')' before ';' to... |
s274644097 | p00002 | C++ | File Edit Options Buffers Tools C++ Development Help
#include<iostream>
#include<stdio.h>
... | a.cc:1:1: error: 'File' does not name a type
1 | File Edit Options Buffers Tools C++ Development Help
| ^~~~
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/io... |
s726313104 | p00002 | C++ | #include<iostream>
#include<stdio.h>
... | a.cc:15:5: error: stray '#' in program
15 | } #include<iostream>
| ^
a.cc:15:6: error: 'include' does not name a type
15 | } #include<iostream>
| ^~~~~~~
|
s596731664 | p00002 | C++ | #include<stdio.h>
int main(void){ ... | a.cc: In function 'int main()':
a.cc:12:8: error: 'cout' is not a member of 'std'
12 | std::cout << keta << std::endl;
| ^~~~
a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include<stdio.h>
+++ |+#include <iostream>
... |
s013991352 | p00002 | C++ | include<iostream>
int main(void){
int a,b,c,i=0; ... | a.cc:1:1: error: 'include' does not name a type
1 | include<iostream>
| ^~~~~~~
|
s537038200 | p00002 | C++ | #include <iostream>
using namespace std;
int main() {
__int64 a, b, c;
int x;
bool flg = true;
while (1) {
cin>>a;
if (a==EOF)
break;
c=a+b;
x = 1;
flg = true;
while (flg) {
if ((c=c/10)>0)
x++;
else
flg = false;
}
cout<<x<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:5:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
5 | __int64 a, b, c;
| ^~~~~~~
| __int64_t
a.cc:10:22: error: 'a' was not declared in this scope
10 | cin>>a;
| ^
a.c... |
s170009731 | p00002 | C++ | c[];main(a,b){for(;~scanf("%d%d",&a,&b);printf("%d",sprintf(c,"%d",a+b)));} | a.cc:1:1: error: 'c' does not name a type
1 | c[];main(a,b){for(;~scanf("%d%d",&a,&b);printf("%d",sprintf(c,"%d",a+b)));}
| ^
a.cc:1:9: error: expected constructor, destructor, or type conversion before '(' token
1 | c[];main(a,b){for(;~scanf("%d%d",&a,&b);printf("%d",sprintf(c,"%d",a+b)));}
| ... |
s370510367 | p00002 | C++ | main(a,b){for(;~scanf("%d%d",&a,&b);printf("%d\n",sprintf(&a,"%d",a+b)));} | a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | main(a,b){for(;~scanf("%d%d",&a,&b);printf("%d\n",sprintf(&a,"%d",a+b)));}
| ^
|
s646232705 | p00002 | C++ | a;main(b){for(;~scanf("%d%d",&a,&b);printf("%d\n",log10(a+b)+1));} | a.cc:1:1: error: 'a' does not name a type
1 | a;main(b){for(;~scanf("%d%d",&a,&b);printf("%d\n",log10(a+b)+1));}
| ^
a.cc:1:7: error: expected constructor, destructor, or type conversion before '(' token
1 | a;main(b){for(;~scanf("%d%d",&a,&b);printf("%d\n",log10(a+b)+1));}
| ^
|
s448374523 | p00002 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
int digit(int num){
if((num / 10) > 0){
return (digit(num/10))+1;
}
else return 1;
}
int main(){
int num1,num2,result=0;
char buf[256];
while(1){
gets(buf);
if(buf[0] == '\0')break;
num1 = 0;
num2 = 0;
sprintf(buf,"%d %d",num1,num2);
resu... | a.cc: In function 'int main()':
a.cc:17:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
17 | gets(buf);
| ^~~~
| getw
|
s623357525 | p00002 | C++ | #include <stdio.h>
int ketasu(int atai){
int result = 0;
for(atai != 0){
result++;
atai = atai / 10;
}
return result;
}
int main(){
int a, b;
while(scanf("%d %d",&a, &b) != EOF) printf("%d\n", ketasu(a + b));
return 0;
} | a.cc: In function 'int ketasu(int)':
a.cc:4:22: error: expected ';' before ')' token
4 | for(atai != 0){
| ^
| ;
a.cc:8:9: error: expected primary-expression before 'return'
8 | return result;
| ^~~~~~
a.cc:7:10: error: expected... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.