submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s896590015
p00002
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace project { class Program { static void Main(string[] args) { string input = Console.ReadLine(); string[] numbers=input.Split(' '); int...
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...
s251706818
p00002
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace project { class Program { static void Main(string[] args) { string input = Console.ReadLine(); string[] numbers=input.Split(' '); int...
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...
s313623377
p00002
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace project { class Test { static void Main(string[] args) { string input = Console.ReadLine(); string[] numbers=input.Split(' '); int a...
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...
s661023822
p00002
C++
#include<string> #include<iostream> using namespace std; int main() { int a, b; cin >> a >> b; while (a != -1){ int c = log10(a + b) + 1; cout << c << endl; cin >> a >> b; } }
a.cc: In function 'int main()': a.cc:12:25: error: 'log10' was not declared in this scope 12 | int c = log10(a + b) + 1; | ^~~~~
s258519158
p00002
C++
#include <iostream> using namesapce std; int main(){ int a,b,c; do{ cin >> a >> b; c = a+b; if (c>1000000) cout << "7" << endl; else if (c>100000) cout << "6" << endl; else if (c>10000) cout << "5" << endl; else if (c>1000) cout << "4" << endl; else if...
a.cc:2:7: error: expected nested-name-specifier before 'namesapce' 2 | using namesapce std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin >> a >> b; | ^~~ | std::cin In file included from a....
s704673395
p00002
C++
#include <iostream> using namespace std; int main(){ int a,b,c; do{ cin >> a >> b; c = a+b; if (c>1000000) cout << "7" << endl; else if (c>100000) cout << "6" << endl; else if (c>10000) cout << "5" << endl; else if (c>1000) cout << "4" << endl; else if...
a.cc: In function 'int main()': a.cc:22:10: error: expected primary-expression before 'bool' 22 | } while (bool eof()==false); | ^~~~ a.cc:22:10: error: expected ')' before 'bool' 22 | } while (bool eof()==false); | ~^~~~ | ) a.cc:22:10: error: expected ';' before 'bool...
s614519424
p00002
C++
#include <iostream> using namespace std; int main(){ int a,b,c; while ( ain.eof()){break;} c = a+b; if (c/1000000>=1) cout << "7" << endl; else if (c/100000>=1) cout << "6" << endl; else if (c/10000>=1) cout << "5" << endl; else if (c/1...
a.cc: In function 'int main()': a.cc:5:13: error: 'ain' was not declared in this scope; did you mean 'main'? 5 | while ( ain.eof()){break;} | ^~~ | main a.cc: At global scope: a.cc:22:1: error: expected declaration before '}' token 22 | } | ^
s503127784
p00002
C++
#include <iostream> using namespace std; int main(){ int a,b,c; while ( cin >> a >> b){ if(cin.eof()){break;} c = a+b; if (c/1000000>=1) cout << "7" << endl; else if (c/100000>=1) cout << "6" << endl; else if (c/10000>=1) cout << "5" <<...
a.cc: In function 'int main()': a.cc:15:24: error: expected ';' before 'a' 15 | cout << "4" a<< endl; | ^~ | ;
s726715816
p00002
C++
#include <iostream> #include <math.h> #include <algorithm> using namespace std; int main() { int a,b,c; cin >>a >>b; c = a+b; int ret = 1; for(i=1;;i++){ if( (c/pow(10,i) >=1 ){ ret++; }else{ break; } } cout <<ret <<endl; return 0; }
a.cc: In function 'int main()': a.cc:12:13: error: 'i' was not declared in this scope 12 | for(i=1;;i++){ | ^ a.cc:13:39: error: expected ')' before '{' token 13 | if( (c/pow(10,i) >=1 ){ | ~ ^ | ...
s344635107
p00002
C++
#include <iostream> #include <math.h> #include <algorithm> using namespace std; int main() { int a,b,c; cin >>a >>' '>>b; c = a+b; int ret = 1; for(int i=1;;i++){ if( c/pow(10,i)){ ret++; }else{ break; } } cout <<ret <<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:17: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'char') 9 | cin >>a >>' '>>b; | ~~~~~~~ ^~~~~ | | | | | char | ...
s269389079
p00002
C++
#include <iostream> #include <sstream> int main() { unsigned int x, y; std::iostringstream ss; std::cin >> x >> y; ss << x+y; std::cout << ss.str.size << std::endl; }
a.cc: In function 'int main()': a.cc:6:8: error: 'iostringstream' is not a member of 'std'; did you mean 'wostringstream'? 6 | std::iostringstream ss; | ^~~~~~~~~~~~~~ | wostringstream a.cc:9:3: error: 'ss' was not declared in this scope 9 | ss << x+y; | ^~
s253425509
p00002
C++
#include<iostream> using namespace std; int main() { int num1, num2,sum; int n = 1; cin >> num1 >> num2; sum = num1 + num2; while (true) { int po = pow(10, n); if (!((sum % po) == sum)) n++; else break; } cout << n << endl; cin >> n; return 0; }
a.cc: In function 'int main()': a.cc:15:26: error: 'pow' was not declared in this scope; did you mean 'po'? 15 | int po = pow(10, n); | ^~~ | po
s814780426
p00002
C++
#include<iostream> #include<cmath> using namespace std; int main() { int num1[3], num2[3],sum[3]; for(int i = 0;i < 3;i++) { cin >> num1[i] >> num2[i]; sum[i] = num1[i] >> num2[i]; } for(int i = 0;i < 3;i++) { int n = 1; while (true) { int ...
a.cc: In function 'int main()': a.cc:23:23: error: invalid operands of types 'int [3]' and 'int' to binary 'operator%' 23 | if (!((sum % po) == sum)) | ~~~ ^ ~~ | | | | | int | int [3]
s571166585
p00002
C++
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); for (int i = 0; i < 200; i++) { int x1 =input.nextInt(); int x2 =input.nextInt(); int x3 = input.nextInt(); String s1 = String.valueOf(x...
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 { | ^~~~~~
s288471795
p00002
C++
def counts(num): if num:counts(map(int, raw_input().split())) if num:countlist.append(len(str(num[0]+num[1]))) countlist = [] counts(map(int, raw_input().split())) countlist.reverse() for x in countlist: print x
a.cc:1:1: error: 'def' does not name a type 1 | def counts(num): | ^~~
s076873680
p00002
C++
dataset = STDIN.read.split("\n").map do |data| data.split(" ") end.map do |data| data.map(&:to_i) end dataset.each do |data| puts (data[0] + data[1]).to_s.size end
a.cc:1:1: error: 'dataset' does not name a type 1 | dataset = STDIN.read.split("\n").map do |data| | ^~~~~~~
s154411502
p00002
C++
#include <iostream> #include <cmath> #include <stdlib.h> #include <stdio.h> #include <string.h> using namespace std; int main() { long long int a,b; char c1[15],c2[15]; int count=0; int i; while(scanf("%lld %lld",&a,&b)==2) { itoa(a,c1,10); itoa(b,c2,10); i=0; while(i<strlen(c1)) { if(c1[i]!='0')...
a.cc: In function 'int main()': a.cc:19:17: error: 'itoa' was not declared in this scope 19 | itoa(a,c1,10); | ^~~~
s286829589
p00002
C++
#include<stdio.h> using namespace std; int main(){ int a, b; while(a!=-1 && b!=-1){ scanf("%d%d", &a, &b); a += b; for(i=0;i<201;i++){ if(a/10==0){ printf("%d\n", i+1); break; } else{ a = a/10; } } } return 0; }
a.cc: In function 'int main()': a.cc:10:7: error: 'i' was not declared in this scope 10 | for(i=0;i<201;i++){ | ^
s218324768
p00002
C++
#include<stdio.h> using namespace std; int main(){ int a, b; while(scanf("%d%d", &a, &b)!=EOF){ a += b; for(i=0;i<201;i++){ if(a/10==0){ printf("%d\n", i+1); break; } else{ a = a/10; } } } return 0; }
a.cc: In function 'int main()': a.cc:9:7: error: 'i' was not declared in this scope 9 | for(i=0;i<201;i++){ | ^
s965250400
p00002
C++
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); while(true) { try{ String[] line = br.readLine().split(" "...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.BufferedReader; | ^~~~~~ 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 java.io.InputStreamReader; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available wit...
s085372794
p00002
C++
while True: try: a, b = map(int, raw_input().split()) print len(str(a+b)) except EOFError: break
a.cc:1:1: error: expected unqualified-id before 'while' 1 | while True: | ^~~~~
s757996510
p00002
C++
while gets ;p $_.split(" ").map{|i|i.to_i}.inject(:+).to_s.size;end
a.cc:1:1: error: expected unqualified-id before 'while' 1 | while gets ;p $_.split(" ").map{|i|i.to_i}.inject(:+).to_s.size;end | ^~~~~ a.cc:1:13: error: 'p' does not name a type 1 | while gets ;p $_.split(" ").map{|i|i.to_i}.inject(:+).to_s.size;end | ^ a.cc:1:43: error: expected unqual...
s648589949
p00002
C++
#include<iostream> using namespace std; int main(){ int a[200],b[200],c[200],digit[200]; int i,imax; digit = 1; i = 0; for(i=0;i<200;i++)digit[i] = 1; while(){ cin >> a[i] >> b[i]; c[i] = a[i] + b[i]; i++; if(a[i]==NULL||b[i]==NULL) break; } imax = i; for(i=0;i<i...
a.cc: In function 'int main()': a.cc:7:10: error: incompatible types in assignment of 'int' to 'int [200]' 7 | digit = 1; | ~~~~~~^~~ a.cc:10:10: error: expected primary-expression before ')' token 10 | while(){ | ^ a.cc:14:15: warning: NULL used in arithmetic [-Wpointer-arith] 1...
s490837159
p00002
C++
#include<iostream> using namespace std; int main(){ int a[200],b[200],c[200],digit[200]; int i,imax,j; digit = 1; i = 0; j = 1; for(i=0;i<200;i++)digit[i] = 1; while(j){ cin >> a[i] >> b[i]; c[i] = a[i] + b[i]; i++; if(a[i]==NULL||b[i]==NULL) break; } imax = i; ...
a.cc: In function 'int main()': a.cc:7:10: error: incompatible types in assignment of 'int' to 'int [200]' 7 | digit = 1; | ~~~~~~^~~ a.cc:15:15: warning: NULL used in arithmetic [-Wpointer-arith] 15 | if(a[i]==NULL||b[i]==NULL) | ^~~~ a.cc:15:27: warning: NULL used in arithm...
s493170017
p00002
C++
#include<iostream> using namespace std; int main(){ int a[200],b[200],c[200],digit[200]; int i,imax; i = 0; for(i=0;i<200;i++)digit[i] = 1; while(){ cin >> a[i] >> b[i]; c[i] = a[i] + b[i]; i++; if(a[i]==NULL||b[i]==NULL) break; } imax = i; for(i=0;i<imax+1;i++){...
a.cc: In function 'int main()': a.cc:9:10: error: expected primary-expression before ')' token 9 | while(){ | ^ a.cc:13:15: warning: NULL used in arithmetic [-Wpointer-arith] 13 | if(a[i]==NULL||b[i]==NULL) | ^~~~ a.cc:13:27: warning: NULL used in arithmetic [-Wpointer-...
s021942127
p00002
C++
#include <iostream> #include <string> using namespace std; int main() { unsigned int a, b; string sa,sb; while (cin) { cin >> a >> b; stringstream ss; ss < (a + b); cout << ss.str().size() << endl; } return 0; }
a.cc: In function 'int main()': a.cc:14:30: error: aggregate 'std::stringstream ss' has incomplete type and cannot be defined 14 | stringstream ss; | ^~
s164944112
p00002
C++
#include <iostream> #include <array> using namespace std; int main(void) { for(int i = 0; i < 3; i++){ int a, b; cin >> a >> b; a+=b; for(int d = 1; a > 0; d++){ a /= 10; } cout << d; } return 0; }
a.cc: In function 'int main()': a.cc:16:25: error: 'd' was not declared in this scope 16 | cout << d; | ^
s907772813
p00002
C++
#include<stdio.h> #include<math.h> int main(){ int a = 0; int b = 0; int c = 0; int i = 0; scanf_s("%d", &a); scanf_s("%d", &b); c = a + b; for (i = 0; c != 0; i++) { c /= 10; } printf("%d\n",i); return 0; }
a.cc: In function 'int main()': a.cc:11:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 11 | scanf_s("%d", &a); | ^~~~~~~ | scanf
s352141769
p00002
C++
#include<stdio.h> #include<math.h> int main(){ int a = 0; int b = 0; int c = 0; int e = 0; for (int i = 0; i < 3; i++) { scanf_s("%d", &a); scanf_s("%d", &b); c = a + b; for (e = 0; c != 0; e++) { c /= 10; } printf("%d\n", e); } return 0; }
a.cc: In function 'int main()': a.cc:13:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 13 | scanf_s("%d", &a); | ^~~~~~~ | scanf
s531131676
p00002
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { while (true) { string a; a = Console.ReadLine(); // Conso...
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...
s388322932
p00002
C++
import java.util.*; public class Main{ static Scanner sc = new Scanner(System.in); public static void main(String[] args){ while(sc.hasNext()){ int a = sc.nextInt(); int b = sc.nextInt(); int c = a+b; int ans = 1; //System.out.println(c); while(c >= 10){ ...
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: expected unqualified-id before 'public' 2 | public class Main{ | ^~~~~~
s524834246
p00002
C++
#include <stdio.h> #include <iostream> #include <string.h> #include <mbstring.h> #include <math.h> using namespace std; int main(void){ double n; int a,b; while(scanf("%d %d",&a,&b)!=EOF){ a+=b; n=log((double)a)/log(10.0); printf("%d\n",(int)(n+1.0)); } return 0; }
a.cc:4:10: fatal error: mbstring.h: No such file or directory 4 | #include <mbstring.h> | ^~~~~~~~~~~~ compilation terminated.
s463752134
p00002
C++
#include<iostream> using namespace std; int main(){ int i; int a,b,sum,figure; do{ cin >> a[i] >> b[i]; }while((a[i]<0||a[i]>100000)&&(b[i]<0||b[i]>100000)); sum = a + b; figure = 1; while(sum[i]/10!=0){ sum[i] = sum[i]/10; figure++; } cout << figure << "\n"; return 0; }
a.cc: In function 'int main()': a.cc:11:25: error: invalid types 'int[int]' for array subscript 11 | cin >> a[i] >> b[i]; | ^ a.cc:11:33: error: invalid types 'int[int]' for array subscript 11 | cin >> a[i] >> b[i]; | ...
s055298525
p00002
C++
#include<iostream> using namespace std; int main(){ longint a,b; int x[200]; int n = 0; while(cin >> a >> b){ x[n] = 0; a = a + b; while(1){ a = a/10; if(a >= 10) x[n]++; } n++; } for(int i = 0; i < n; i++) cout << x[i] << '\n'; return 0; }
a.cc: In function 'int main()': a.cc:4:3: error: 'longint' was not declared in this scope; did you mean 'long'? 4 | longint a,b; | ^~~~~~~ | long a.cc:7:16: error: 'a' was not declared in this scope 7 | while(cin >> a >> b){ | ^ a.cc:7:21: error: 'b' was not declared in ...
s089731600
p00002
C++
#include<stdio.h> int main(void){ Int i,a,b,c; scanf("%d %d",&a,&b); c=a+b; for(i=0;c<10;i++){ c=c/10; } printf("%d\n",i); return(0); }
a.cc: In function 'int main()': a.cc:3:1: error: 'Int' was not declared in this scope; did you mean 'int'? 3 | Int i,a,b,c; | ^~~ | int a.cc:4:16: error: 'a' was not declared in this scope 4 | scanf("%d %d",&a,&b); | ^ a.cc:4:19: error: 'b' was not declared in this scope 4 |...
s208817426
p00002
C++
#include <iostream> #include <cmath> using namespace std; int main(){ unsigned 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:7:9: error: expected initializer before 'while' 7 | while(cin>>a>>b){ | ^~~~~
s489658714
p00002
C++
#include<iostream> #include<string> #include<cmath> #include <fstream> using namespace std; int main() { string input; string hoge; string fuga; string piyo; long first, second; int size = 0; int i; long sum = 0; double sep = 0; cout << "...
a.cc:33:1: error: expected class-name before '~' token 33 | ~ | ^
s948515043
p00002
C++
import java.util.*; class Main{ public static void main(String[] args){ int a; int b; Scanner sc=new Scanner(System.in); while(sc.hasNextInt()){ a=sc.nextInt(); b=sc.nextInt(); int d=(int)Math.log10(a+b); System.out.println(d); } } }
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:7: error: expected ':' before 'static' 4 | public static void main(String[] args){ | ^~~~~~~ | : a.cc:4:25: error: 'String' has n...
s450254098
p00002
C++
#include<iostream> using namaspace std; int main() { while(scanf("%d %d",&a,&b) != EOF) { sum = a + b; while (sum > 0){ sum /= 10; result++; } cout << result; } return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'namaspace' 2 | using namaspace std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:5:22: error: 'a' was not declared in this scope 5 | while(scanf("%d %d",&a,&b) != EOF) | ^ a.cc:5:25: error: 'b' was not declared in...
s942610901
p00002
C++
#include<stdio.h> #include<math.h> #include<stdlib.h> #include<string.h> #include<string> #include<algorithm> #include<iostream> #include<stack> #include<queue> #include<vector> #include<map> #include<set> using namespace std; int reshan(int sum) { int i=0; while(sum!=0) { i++; sum=sum/10; ...
a.cc: In function 'int reshan(int)': a.cc:22:15: error: expected ';' before '}' token 22 | return i;5 | ^ | ; 23 | } | ~
s682870239
p00002
C++
#include <iostream> int main(){ int a, b, n, ans ; while ( std::cin >> a >> b >> std::endl ) { a+b=n; ans=0; while( n > 0, ans++, n /= 10 ); cout << ans << endl; } return 0; }
a.cc: In function 'int main()': a.cc:5:36: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and '<unresolved overloaded function type>') 5 | while ( std::cin >> a >> b >> std::endl ) { | ~~~~~~~~~~~~~~~~~~~^...
s825072537
p00002
C++
def digit n i = 0 while n>0 n = n/10 i +=1 end i end while n = gets a,b = n.chomp.split a,b = a.to_i,b.to_i puts digit a+b end
a.cc:1:1: error: 'def' does not name a type 1 | def digit n | ^~~
s636622874
p00002
C++
def digit n i = 0 while n>0 n = n/10 i +=1 end i end while n = gets a,b = n.chomp.split a,b = a.to_i,b.to_i puts digit a+b end
a.cc:1:1: error: 'def' does not name a type 1 | def digit n | ^~~
s714210185
p00002
C++
#include<iostream> #include<string> #include<array> using namespace std; int main(){ array<int, 6> t{ {10, 100, 1000, 10000, 100000, 1000000} }; for (int i = 0; i < 200; ++i) { if (!cin) { break; } int a, b, sum; cin >> a >> b; sum = a + b; auto result = find_if(t.begin(), t.end(), [sum](...
a.cc: In function 'int main()': a.cc:18:32: error: 'find_if' was not declared in this scope 18 | auto result = find_if(t.begin(), t.end(), [sum](const int x){return sum < x; }); | ^~~~~~~
s052911072
p00002
C++
#include<iostream> #include<string> #include<array> using namespace std; int main(){ array<int, 6> t{ {10, 100, 1000, 10000, 100000, 1000000} }; for (int i = 0; i < 200; ++i) { if (!cin) { break; } int a, b, sum; cin >> a >> b; sum = a + b; auto result = find_if(t.begin(), t.end(), [sum](...
a.cc: In function 'int main()': a.cc:18:32: error: 'find_if' was not declared in this scope 18 | auto result = find_if(t.begin(), t.end(), [sum](const int x){return sum < x; }); | ^~~~~~~
s333101867
p00002
C++
#include <iostream> using namespace std; int main(){ long int a,b,sum; int i,j; while(cin>>a>>b) { sum=a+b; for(j=0;sum>0;j++) { sum=sum/10; } cout<<j<<endl; }
a.cc: In function 'int main()': a.cc:17:6: error: expected '}' at end of input 17 | } | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s403030662
p00002
C++
#include <iostream> using namespace std; int main(int argc, char** argv) { int a,b; sum=0; cin >>a>>b; int sum = a+b; int n=0; while (sum>= 1) { n++; sum/=10; } cout <<n << endl; return 0; }
a.cc: In function 'int main(int, char**)': a.cc:6:9: error: 'sum' was not declared in this scope 6 | sum=0; | ^~~
s934009297
p00002
C++
include<iostream> #include<string> using namespace std; int main() { int a,b; char ans[16]; while(scanf("%d %d",&a,&b) != EOF){ if(a == 0 && b == 0)break; sprintf(ans,"%d",a+b); int len = strlen(ans); cout << len << endl; } }
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from a.cc:2: /usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type...
s072190192
p00002
C++
1 #include<iostream> 2 #include<stdio.h> 3 using namespace std; 4 int main(){ 5 6 int a,b; 7 while(scanf("%d %d",&a,&b) != EOF){ 8 int i = 0; 9 a = a + b; 10 while(a > 0){ 11 ...
a.cc:1:5: error: stray '#' in program 1 | 1 #include<iostream> | ^ a.cc:2:5: error: stray '#' in program 2 | 2 #include<stdio.h> | ^ a.cc:1:3: error: expected unqualified-id before numeric constant 1 | 1 #include<iostream> | ^ a.cc:4:3: error: expected unqualified-id before...
s447770569
p00002
C++
#include<iostream> using namespace std; int main(void){ int a,b; while(cin>>a>>b) for(a+=b,b=0;a>0;b++,a/=10); cout<<b<<endl; } }
a.cc:9:1: error: expected declaration before '}' token 9 | } | ^
s235086859
p00002
C++
#include <cmath> #include <iostream> using namespace std; int main() { int a, int b; while (cin >> a >> b) { cout << log10(a + b) + 1 << endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:16: error: expected unqualified-id before 'int' 8 | int a, int b; | ^~~ a.cc:10:28: error: 'b' was not declared in this scope 10 | while (cin >> a >> b) | ^
s485946813
p00002
C++
#include <iostream> using namespace std; int main(){ int a, b, c; while ( cin >> a >> b ) { a += b; ans = 0; while( a > 0 , c++ , a /= 10 ); cout << c << endl; } }
a.cc: In function 'int main()': a.cc:8:17: error: 'ans' was not declared in this scope; did you mean 'abs'? 8 | ans = 0; | ^~~ | abs
s628847780
p00002
C++
#include <iostream> using namespace std; int main(){ int a, b, c; while ( cin >> a >> b ) { a += b; ans = 0; while( a > 0 , c++ , a /= 10 ); cout << c << endl; } }
a.cc: In function 'int main()': a.cc:8:17: error: 'ans' was not declared in this scope; did you mean 'abs'? 8 | ans = 0; | ^~~ | abs
s641292428
p00002
C++
#include<stdio.h> int main(){ int ab[200][2],f; while(cin>>f){ scanf("%d %d",&ab[i][1],&ab[i][2]); } }
a.cc: In function 'int main()': a.cc:4:15: error: 'cin' was not declared in this scope 4 | while(cin>>f){ | ^~~ a.cc:5:35: error: 'i' was not declared in this scope 5 | scanf("%d %d",&ab[i][1],&ab[i][2]); | ^
s993273496
p00002
C++
#include<stdio.h> #include<iostream.h> int main(){ int ab[200][2],f,i=0,a,g,k=0; while(cin<f){ scanf("%d %d",&ab[i][1],&ab[i][2]); i++; } for(int j=0;j<i;j++){ a=ab[j][1]+ab[j][2]; for(g=0;;g++){ a=a/10; k++; if(a==0){ printf("%d\n",k); break; } } k=0; } return 0; }
a.cc:2:9: fatal error: iostream.h: No such file or directory 2 | #include<iostream.h> | ^~~~~~~~~~~~ compilation terminated.
s432106878
p00002
C++
#include<stdio.h> #include<iostream.h> using namespace std; int main(){ int ab[200][2],f,i=0,a,g,k=0; while(cin<f){ scanf("%d %d",&ab[i][1],&ab[i][2]); i++; } for(int j=0;j<i;j++){ a=ab[j][1]+ab[j][2]; for(g=0;;g++){ a=a/10; k++; if(a==0){ printf("%d\n",k); break; } } k=0; } return...
a.cc:2:9: fatal error: iostream.h: No such file or directory 2 | #include<iostream.h> | ^~~~~~~~~~~~ compilation terminated.
s979178349
p00002
C++
#include<stdio.h> #include<iostream.h> using namespace std; int main(){ int ab[200][2],i=0,a,g,k=0; double f; while(cin<f){ scanf("%d %d",&ab[i][1],&ab[i][2]); i++; } for(int j=0;j<i;j++){ a=ab[j][1]+ab[j][2]; for(g=0;;g++){ a=a/10; k++; if(a==0){ printf("%d\n",k); break; } } k=0; }...
a.cc:2:9: fatal error: iostream.h: No such file or directory 2 | #include<iostream.h> | ^~~~~~~~~~~~ compilation terminated.
s888144563
p00002
C++
#include<stdio.h> #include<iostream.h> using namespace std; int main(){ int ab[200][2],i=0,a,g,k=0; double f=200; while(cin<f){ scanf("%d %d",&ab[i][1],&ab[i][2]); i++; } for(int j=0;j<i;j++){ a=ab[j][1]+ab[j][2]; for(g=0;;g++){ a=a/10; k++; if(a==0){ printf("%d\n",k); break; } } k=0...
a.cc:2:9: fatal error: iostream.h: No such file or directory 2 | #include<iostream.h> | ^~~~~~~~~~~~ compilation terminated.
s274522498
p00002
C++
#include "stdafx.h" #include <iostream> using namespace std; int a, b; void solve() { int res = 0; a += b; for (; a; a /= 10) res++; cout << res << endl; } int main() { while (cin >> a >> b) solve(); return 0; }
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s805346449
p00002
C++
import java.util.Scanner; class Main{ public static void main(String args[]){ Scanner in = new Scanner(System.in); while(in.hasNext()){ int a = in.nextInt(); int b = in.nextInt(); int c = (int)Math.log10(a+b) + 1; System.out.println(c); } } }
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:4:15: error: expected ':' before 'static' 4 | public static void main(String args[]){ | ^~~~~~~ | : a...
s506467294
p00002
C++
include <cstdio> #include <iostream> #include <cmath> using namespace std; int main() { int a, b; while(a != EOF) { cin >> a >> b; a += b; a = (int)log10((double)a) + 1; cout << a << endl; } return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include <cstdio> | ^~~~~~~ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, fr...
s058950731
p00002
C++
#include <iostream> using namespace std; int main(){ int a,b,c; int ans; bool flg; int cnt=-1; while(cin>>a>>b){ cnt++;flg=false; //-----test----- switch(cnt){ case 0: if(b!=0) flg=true; break; } if(flg) break; //-------------- c=a+b; ans=1; while(10<=c){ c/=10; ans++; }...
a.cc: In function 'int main()': a.cc:31:18: error: expected '}' at end of input 31 | return 0; | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s149289374
p00002
C++
#include <iostream> using namespace std; int main(){ int a,b,c; int ans; for(i=0;i<103;i++){ cin>>a>>b;c=a+b; //-----test----- i //-------------- ans=1; while(10<=c){ c/=10; ans++; } cout<<ans<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:13: error: 'i' was not declared in this scope 8 | for(i=0;i<103;i++){ | ^ a.cc:11:18: error: expected ';' before 'ans' 11 | i | ^ | ; 12 | //-------------- 13 | ...
s683900955
p00002
C++
#include <iostream> using namespace std; int main(){ int a,b,c; int ans; for(inti=0;i<103;i++){ cin>>a>>b;c=a+b; //-----test----- i //-------------- ans=1; while(10<=c){ c/=10; ans++; } cout<<ans<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:13: error: 'inti' was not declared in this scope; did you mean 'int'? 8 | for(inti=0;i<103;i++){ | ^~~~ | int a.cc:8:20: error: 'i' was not declared in this scope 8 | for(inti=0;i<103;i++){ | ^ a....
s424748699
p00002
C++
#include <iostream> using namespace std; int main(){ int a,b,c; int ans; for(int i=0;i<103;i++){ cin>>a>>b;c=a+b; //-----test----- i //-------------- ans=1; while(10<=c){ c/=10; ans++; } cout<<ans<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:18: error: expected ';' before 'ans' 11 | i | ^ | ; 12 | //-------------- 13 | ans=1; | ~~~
s476242526
p00002
C++
#include <iostream> #include <string> using namespace std; int main(){ int a,b,c; int ans; string cunning="7765; for(int i=0;i<104;i++){ cin>>a>>b;c=a+b; //-----test----- if(i<cunning.size()){ cout<<cunning[i]<<endl; continue; } //-------------- ans=1; while(10<=c){ c/=10; ans++; } ...
a.cc:9:24: warning: missing terminating " character 9 | string cunning="7765; | ^ a.cc:9:24: error: missing terminating " character 9 | string cunning="7765; | ^~~~~~ a.cc: In function 'int main()': a.cc:11:9: error: expected primary-expr...
s693706029
p00002
C++
#include<iostream> using namespace std; int main() { int a, b, c,d; char e[100]; cin >> a >> b; c=a+b; d = sprintf_s(e,"%d", c); cout << d << endl; return 0; }
a.cc: In function 'int main()': a.cc:13:21: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'? 13 | d = sprintf_s(e,"%d", c); | ^~~~~~~~~ | sprintf
s460789324
p00002
C++
#include<iostream> #include<cstdio> using namespace std; int main() { int a, b, c,d; char e[100]; cin >> a >> b; c=a+b; d = sprintf_s(e,"%d", c); cout << d << endl; return 0; }
a.cc: In function 'int main()': a.cc:14:21: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'? 14 | d = sprintf_s(e,"%d", c); | ^~~~~~~~~ | sprintf
s726936428
p00002
C++
#include<iostream> #include<cstdio> using namespace std; int main() { int a, b, c,d; char e[100]; while (cin >> a >> b) { c = a + b; d = sprintf_s(e, "%d", c); cout << d << endl; } return 0; }
a.cc: In function 'int main()': a.cc:14:21: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'? 14 | d = sprintf_s(e, "%d", c); | ^~~~~~~~~ | sprintf
s393942905
p00002
C++
#include<iostream> #include<cstdio> using namespace std; int main() { int a, b, c; char e[100]; while (cin >> a >> b) { c = sprintf_s(e, "%d", a+b); cout << c << endl; } return 0; }
a.cc: In function 'int main()': a.cc:12:21: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'? 12 | c = sprintf_s(e, "%d", a+b); | ^~~~~~~~~ | sprintf
s802719710
p00002
C++
#include<iostream> #include<cstdio> using namespace std; int main() { int a, b, c; char e[100]; while (cin >> a >> b) { c = sprintf_s(e, "%d", a+b); cout << c << endl; } return 0; }
a.cc: In function 'int main()': a.cc:12:21: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'? 12 | c = sprintf_s(e, "%d", a+b); | ^~~~~~~~~ | sprintf
s570306013
p00002
C++
#include<iostream> #include<cstdio> using namespace std; void main() { int a, b, c; char e[100]; while (cin >> a >> b) { c = sprintf(e, "%d", a+b); cout << c << endl; } return 0; }
a.cc:5:1: error: '::main' must return 'int' 5 | void main() { | ^~~~
s797442919
p00002
C++
#include <iostream> using namespace std; int main() { int a, b; while (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 << "...
a.cc: In function 'int main()': a.cc:6:29: error: expected ')' before ';' token 6 | while (cin >> a >> b;) { | ~ ^ | ) a.cc:6:30: error: expected primary-expression before ')' token 6 | while (cin >> a >> b;) { | ...
s831503706
p00002
C++
#include <iostream> #include <cmath> 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:6:10: 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 cin; ...
s133705455
p00002
C++
#include<iostream> using namespace std; int main(){ char a,b,sum,cnt=0; while(cin >> a >> b){ sum = a + b; while(1){ if (sum<10) break; sum/=10 cnt++; } cout << cnt << endl; cnt=0; } return 0; }
a.cc: In function 'int main()': a.cc:9:8: error: expected ';' before 'cnt' 9 | sum/=10 | ^ | ; 10 | cnt++; | ~~~
s575958473
p00002
C++
#include<iostream> using namespace std; int main(){ int a,b,sum,cnt=1; while(cin>>a>>b){ sum=a+b; while(1){ if (sum<10) break; sum/=10; cnt++; } count<<cnt<<endl; cnt=1; } return 0; }
a.cc: In function 'int main()': a.cc:12:1: error: 'count' was not declared in this scope; did you mean 'cnt'? 12 | count<<cnt<<endl; | ^~~~~ | cnt
s455071932
p00002
C++
#include<iostream> using namespace std; int main() { int a,b,c; while(cin >> a >> b) { c = log10(a+b)+1; cout << c << endl; } return 0; }
a.cc: In function 'int main()': a.cc:6:21: error: 'log10' was not declared in this scope 6 | c = log10(a+b)+1; | ^~~~~
s938337835
p00002
C++
#include<iostream> using namespace std; int main() { int a,b,c; while(cin >> a >> b) { c = log10(a+b)+1; cout << c << endl; } return 0; }
a.cc: In function 'int main()': a.cc:6:21: error: 'log10' was not declared in this scope 6 | c = log10(a+b)+1; | ^~~~~
s505858021
p00002
C++
#include <cstdio> int main(){ int d,n,a,b,; while(true){ d=0; if (scanf("%d %d",&a,&b)==0) break; n=a+b; while(n>0) { d++, n/=10 }; printf("%d\n",d); return 0; };
a.cc: In function 'int main()': a.cc:3:14: error: expected unqualified-id before ';' token 3 | int d,n,a,b,; | ^ a.cc:8:26: error: expected ';' before '}' token 8 | while(n>0) { d++, n/=10 }; | ^~ | ; a.cc:11:3: error: expected ...
s033984612
p00002
C++
#include <cstdio> int main(){ int d,n,a,b; while(true){ d=0; if (scanf("%d %d",&a,&b)==0) break; n=a+b; while(n>0) { d++, n/=10 }; printf("%d\n",d); return 0; };
a.cc: In function 'int main()': a.cc:8:26: error: expected ';' before '}' token 8 | while(n>0) { d++, n/=10 }; | ^~ | ; a.cc:11:3: error: expected '}' at end of input 11 | }; | ^ a.cc:2:11: note: to match this '{' 2 | int main(){ |...
s636812778
p00002
C++
#include <cstdio> int main(){ int d,n,a,b; while(true){ d=0; if (scanf("%d %d",&a,&b)==0) break; n=a+b; while(n>0) { d++, n/=10 }; printf("%d\n",d); }; return 0; };
a.cc: In function 'int main()': a.cc:8:26: error: expected ';' before '}' token 8 | while(n>0) { d++, n/=10 }; | ^~ | ;
s398701466
p00002
C++
include<iostream> using namespace std; int main(){ int a,b; cin >> a >> b; cout << to_string(a+b).size() << endl; }
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope 6 | cin >> a >> b; | ^~~ a.cc:7:5: error: 'cout' was not declared in this scope 7 | cout << to_string(a+b).size() << e...
s414539902
p00002
C++
include<iostream> using namespace std; int main(){ int a,b; cin >> a >> b; cout << to_string(a+b).size() << endl; }
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope 6 | cin >> a >> b; | ^~~ a.cc:7:5: error: 'cout' was not declared in this scope 7 | cout << to_string(a+b).size() << e...
s942230906
p00002
C++
#include<iostream> using namespace std; int main(){ int a,b; char c[10]; cin>>a>>b; a+=b; c[]=(char)a; for(int i=0;c[i]!='\0';i++) cout<<i+1<<endl; }
a.cc: In function 'int main()': a.cc:8:3: error: expected primary-expression before ']' token 8 | c[]=(char)a; | ^
s577519030
p00002
C++
#include<iostream> #include<cstdio> using namespace std; int main() { unsigned int a, b, i = 0; while (scanf_s("%d %d", &a, &b)!=EOF){ a += b; while (1) { if (a / 10 != 0) { a /= 10; i++; } else break; } cout << i + 1 << endl; i = 0; } return 0; }
a.cc: In function 'int main()': a.cc:6:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 6 | while (scanf_s("%d %d", &a, &b)!=EOF){ | ^~~~~~~ | scanf
s473927054
p00002
C++
#include <cstdio> int main(){ ?? int a, b; ?? int cou; ?? while (scanf("%d %d", &a, &b) != EOF){ ?? ?? a += b; ?? ?? cou == 0; ?? ?? while (a != 0){ ?? ?? ?? a /= 10; ?? ?? ?? cou++; ?? ?? } ?? ?? printf("%d", cou); ?? } ?? return 0; }
a.cc: In function 'int main()': a.cc:4:1: error: expected primary-expression before '?' token 4 | ?? int a, b; | ^ a.cc:4:2: error: expected primary-expression before '?' token 4 | ?? int a, b; | ^ a.cc:4:4: error: expected primary-expression before 'int' 4 | ?? int a, b; | ^~~ a.cc:4:...
s788412680
p00002
C++
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] a) { BufferedReader br; br = new BufferedReader(new InputStreamReader(System.in)); int[] num = new int[2]; try { String str = br.readLine(); String[] array =...
a.cc:2:1: error: 'import' does not name a type 2 | import java.io.BufferedReader; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import java.io.IOException; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fm...
s798890691
p00002
C++
import math a = input() b = input() c = int(math.log10(a) + 1) + int(math.log10(b) + 1) print c
a.cc:1:1: error: 'import' does not name a type 1 | import math | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s911171940
p00002
C++
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 #include<stdio.h> int main(){ int i,j,count=0,sum; int a[3],b[3]; while(1){ if(scanf("%d %d",&a[i],&b[i]) == EOF){break;} i++; } for(j = 0;j<i;j++){ sum = a[j]+b[j]; while(sum >0){ sum/=10; count++; }printf("%d\n",count); count = 0; } }
a.cc:2:1: error: expected unqualified-id before numeric constant 2 | 2 | ^ a.cc: In function 'int main()': a.cc:27:4: error: 'scanf' was not declared in this scope 27 | if(scanf("%d %d",&a[i],&b[i]) == EOF){break;} | ^~~~~ a.cc:35:2: error: 'printf' was not declared in this scope 35 | }printf("...
s807425302
p00002
C++
#include<iostream> using namespace std; int keta(int a,int b) { return (a+b)/10-(a+b)%10; } int main() { int a[200],b[200]; for(int i = 0;i<200;i++){ a[i]=0; b[i]=0; } int i=0; while(cin=="\n\n"){ cin>>a[i],b[i]; i++; } int j = 0; while(i<j){ cout<<keta(a[j],b[j]); cout<<"\n"; j++; } return 0;...
a.cc: In function 'int main()': a.cc:15:18: error: no match for 'operator==' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'const char [3]') 15 | while(cin=="\n\n"){ | ~~~^~~~~~~~ | | | | | const char [3] | ...
s146904187
p00002
C++
try: s = [] while True: t = input() s.append(t) except EOFError: for i in range(len(s)): a = int(s[i].split(' ')[0]) b = int(s[i].split(' ')[1]) print(len(str(a + b)))
a.cc:1:1: error: expected unqualified-id before 'try' 1 | try: | ^~~
s577190385
p00002
C++
#include <iostream> //using namespace std; int main() { double a,b; while(std::cin>>a>>b) { int digit=(int)log10(a+b); std::cout << digit+1 << std::endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:32: error: 'log10' was not declared in this scope 9 | int digit=(int)log10(a+b); | ^~~~~
s592854001
p00002
C++
#include <iostream> //using namespace std; int main() { double a,b; while(std::cin>>a>>b) { int digit=(int)std::log10(a+b); std::cout << digit+1 << std::endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:37: error: 'log10' is not a member of 'std' 9 | int digit=(int)std::log10(a+b); | ^~~~~
s796186909
p00002
C++
#include <iostream> //using namespace std; int main() { double a,b; while(std::cin>>a>>b) { int digit=(int)std::log10(a+b); std::cout << digit+1 << std::endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:37: error: 'log10' is not a member of 'std' 9 | int digit=(int)std::log10(a+b); | ^~~~~
s762099927
p00002
C++
#include <iostream> //using namespace std; int main() { double a,b; while(std::cin>>a>>b) { int digit=(int)std::log10(a+b); std::cout << digit+1 << std::endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:37: error: 'log10' is not a member of 'std' 9 | int digit=(int)std::log10(a+b); | ^~~~~
s361753108
p00002
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ int a,b,s,i,n; while(cin >> a >> b;){ n=0; s=a+b; while(s!=0){ s/=10; n++; } cout << n << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:28: error: expected ')' before ';' token 7 | while(cin >> a >> b;){ | ~ ^ | ) a.cc:7:29: error: expected primary-expression before ')' token 7 | while(cin >> a >> b;){ | ...
s639874865
p00002
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ int a,b,s,i,n; while(cin >> a >> b){ n=0; s=a+b; while(s!=0){ s/=10; n++; } cout << n << endl; return 0; }
a.cc: In function 'int main()': a.cc:17:2: error: expected '}' at end of input 17 | } | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s372187127
p00002
C++
#include <iostream> using namespace std; ?? int main() { int a, b; ????while (cin >> a >> b) { ????????int c = a + b; ????????int i; ????????for (i = 1; c != 0; i++) { ????????????c /= 10; ????????} ????????cout << i << endl; ?? ????} ????return 0; }
a.cc:3:1: error: expected unqualified-id before '?' token 3 | ?? | ^
s903386841
p00002
C++
# coding: utf-8 import sys import math numbers = [] for line in sys.stdin: numbers.append(line.split()) for i in range(len(numbers)): sum = int(numbers[i][0]) + int(numbers[i][1]) print int(math.log10(float(sum))) + 1
a.cc:1:3: error: invalid preprocessing directive #coding 1 | # coding: utf-8 | ^~~~~~ a.cc:2:1: error: 'import' does not name a type 2 | import sys | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
s092262412
p00002
C++
#include <stdio.h> int main(){ int a,b; while(scanf("%d %d ",&a,&b){ a+=b; b=0; while(a>0){ b++; a/=10 } printf("%d\n",b); } return 0; }
a.cc: In function 'int main()': a.cc:5:29: error: expected ')' before '{' token 5 | while(scanf("%d %d ",&a,&b){ | ~ ^ | ) a.cc:10:8: error: expected ';' before '}' token 10 | a/=10 | ^ | ; 11 | } | ~ ...