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 answer = Convert.ToInt16(numbers[0] + numbers[1]); string amswer1 = Convert.ToString(answer); Console.WriteLine((amswer1.Length)+1); } } }
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.Linq; | ^~~~~~ a.cc:4:7: error: expected nested-name-specifier before 'System' 4 | using System.Text; | ^~~~~~ a.cc:5:7: error: expected nested-name-specifier before 'System' 5 | using System.Threading.Tasks; | ^~~~~~ a.cc:11:26: error: 'string' has not been declared 11 | static void Main(string[] args) | ^~~~~~ a.cc:11:35: error: expected ',' or '...' before 'args' 11 | static void Main(string[] args) | ^~~~ a.cc:19:6: error: expected ';' after class definition 19 | } | ^ | ; a.cc: In static member function 'static void project::Program::Main(int*)': a.cc:13:13: error: 'string' was not declared in this scope 13 | string input = Console.ReadLine(); | ^~~~~~ a.cc:14:20: error: expected primary-expression before ']' token 14 | string[] numbers=input.Split(' '); | ^ a.cc:15:27: error: 'Convert' was not declared in this scope 15 | int answer = Convert.ToInt16(numbers[0] + numbers[1]); | ^~~~~~~ a.cc:15:43: error: 'numbers' was not declared in this scope 15 | int answer = Convert.ToInt16(numbers[0] + numbers[1]); | ^~~~~~~ a.cc:16:20: error: expected ';' before 'amswer1' 16 | string amswer1 = Convert.ToString(answer); | ^~~~~~~ a.cc:17:13: error: 'Console' was not declared in this scope 17 | Console.WriteLine((amswer1.Length)+1); | ^~~~~~~ a.cc:17:32: error: 'amswer1' was not declared in this scope; did you mean 'answer'? 17 | Console.WriteLine((amswer1.Length)+1); | ^~~~~~~ | answer
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 answer = Convert.ToInt16(numbers[0]) +Convert.ToInt16( numbers[1]); string amswer1 = Convert.ToString(answer); Console.WriteLine((amswer1.Length)); } } }
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.Linq; | ^~~~~~ a.cc:4:7: error: expected nested-name-specifier before 'System' 4 | using System.Text; | ^~~~~~ a.cc:5:7: error: expected nested-name-specifier before 'System' 5 | using System.Threading.Tasks; | ^~~~~~ a.cc:11:26: error: 'string' has not been declared 11 | static void Main(string[] args) | ^~~~~~ a.cc:11:35: error: expected ',' or '...' before 'args' 11 | static void Main(string[] args) | ^~~~ a.cc:19:6: error: expected ';' after class definition 19 | } | ^ | ; a.cc: In static member function 'static void project::Program::Main(int*)': a.cc:13:13: error: 'string' was not declared in this scope 13 | string input = Console.ReadLine(); | ^~~~~~ a.cc:14:20: error: expected primary-expression before ']' token 14 | string[] numbers=input.Split(' '); | ^ a.cc:15:27: error: 'Convert' was not declared in this scope 15 | int answer = Convert.ToInt16(numbers[0]) +Convert.ToInt16( numbers[1]); | ^~~~~~~ a.cc:15:43: error: 'numbers' was not declared in this scope 15 | int answer = Convert.ToInt16(numbers[0]) +Convert.ToInt16( numbers[1]); | ^~~~~~~ a.cc:16:21: error: expected ';' before 'amswer1' 16 | string amswer1 = Convert.ToString(answer); | ^~~~~~~ a.cc:17:13: error: 'Console' was not declared in this scope 17 | Console.WriteLine((amswer1.Length)); | ^~~~~~~ a.cc:17:32: error: 'amswer1' was not declared in this scope; did you mean 'answer'? 17 | Console.WriteLine((amswer1.Length)); | ^~~~~~~ | answer
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 answer = Convert.ToInt16(numbers[0]) +Convert.ToInt16( numbers[1]); string amswer1 = Convert.ToString(answer); Console.WriteLine((amswer1.Length)); } } }
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.Linq; | ^~~~~~ a.cc:4:7: error: expected nested-name-specifier before 'System' 4 | using System.Text; | ^~~~~~ a.cc:5:7: error: expected nested-name-specifier before 'System' 5 | using System.Threading.Tasks; | ^~~~~~ a.cc:11:26: error: 'string' has not been declared 11 | static void Main(string[] args) | ^~~~~~ a.cc:11:35: error: expected ',' or '...' before 'args' 11 | static void Main(string[] args) | ^~~~ a.cc:19:6: error: expected ';' after class definition 19 | } | ^ | ; a.cc: In static member function 'static void project::Test::Main(int*)': a.cc:13:13: error: 'string' was not declared in this scope 13 | string input = Console.ReadLine(); | ^~~~~~ a.cc:14:20: error: expected primary-expression before ']' token 14 | string[] numbers=input.Split(' '); | ^ a.cc:15:27: error: 'Convert' was not declared in this scope 15 | int answer = Convert.ToInt16(numbers[0]) +Convert.ToInt16( numbers[1]); | ^~~~~~~ a.cc:15:43: error: 'numbers' was not declared in this scope 15 | int answer = Convert.ToInt16(numbers[0]) +Convert.ToInt16( numbers[1]); | ^~~~~~~ a.cc:16:21: error: expected ';' before 'amswer1' 16 | string amswer1 = Convert.ToString(answer); | ^~~~~~~ a.cc:17:13: error: 'Console' was not declared in this scope 17 | Console.WriteLine((amswer1.Length)); | ^~~~~~~ a.cc:17:32: error: 'amswer1' was not declared in this scope; did you mean 'answer'? 17 | Console.WriteLine((amswer1.Length)); | ^~~~~~~ | answer
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 (c>100) cout << "3" << endl; else if (c>10) cout << "2" << endl; else cout << "1" << endl; } while (true); }
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.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:9:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 9 | cout << "7" << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:9:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 9 | cout << "7" << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:11:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 11 | cout << "6" << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:11:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 11 | cout << "6" << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:13:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 13 | cout << "5" << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:13:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 13 | cout << "5" << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:15:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 15 | cout << "4" << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:15:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 15 | cout << "4" << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:17:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 17 | cout << "3" << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:17:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 17 | cout << "3" << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:19:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 19 | cout << "2" << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:19:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 19 | cout << "2" << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:21:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 21 | cout << "1" << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:21:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 21 | cout << "1" << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
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 (c>100) cout << "3" << endl; else if (c>10) cout << "2" << endl; else cout << "1" << endl; } while (bool eof()==false); }
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' 22 | } while (bool eof()==false); | ^~~~ | ; a.cc:22:18: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 22 | } while (bool eof()==false); | ^~ a.cc:22:18: note: remove parentheses to default-initialize a variable 22 | } while (bool eof()==false); | ^~ | -- a.cc:22:18: note: or replace parentheses with braces to value-initialize a variable a.cc:22:20: error: expected initializer before '==' token 22 | } while (bool eof()==false); | ^~
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/1000>=1) cout << "4" << endl; else if (c/100>=1) cout << "3" << endl; else if (c/10>=1) cout << "2" << endl; else cout << "1" << endl; } }
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" << endl; else if (c/1000>=1) cout << "4" a<< endl; else if (c/100>=1) cout << "3" << endl; else if (c/10>=1) cout << "2" << endl; else cout << "1" << endl; } }
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 ){ | ~ ^ | ) a.cc:18:9: error: expected primary-expression before '}' token 18 | } | ^
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 | std::basic_istream<char>::__istream_type {aka std::basic_istream<char>} In file included from /usr/include/c++/14/iostream:42, from a.cc:1: /usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:7: note: conversion of argument 1 would be ill-formed: a.cc:9:19: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'char' 9 | cin >>a >>' '>>b; | ^~~ /usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:7: note: conversion of argument 1 would be ill-formed: a.cc:9:19: error: cannot bind non-const lvalue reference of type 'short int&' to a value of type 'char' 9 | cin >>a >>' '>>b; | ^~~ /usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:7: note: conversion of argument 1 would be ill-formed: a.cc:9:19: error: cannot bind non-const lvalue reference of type 'short unsigned int&' to a value of type 'char' 9 | cin >>a >>' '>>b; | ^~~ /usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:7: note: conversion of argument 1 would be ill-formed: a.cc:9:19: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'char' 9 | cin >>a >>' '>>b; | ^~~ /usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:7: note: conversion of argument 1 would be ill-formed: a.cc:9:19: error: cannot bind non-const lvalue reference of type 'unsigned int&' to a value of type 'char' 9 | cin >>a >>' '>>b; | ^~~ /usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:7: note: conversion of argument 1 would be ill-formed: a.cc:9:19: error: cannot bind non-const lvalue reference of type 'long int&' to a value of type 'char' 9 | cin >>a >>' '>>b; | ^~~ /usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:7: note: conversion of argument 1 would be ill-formed: a.cc:9:19: error: cannot bind non-const lvalue reference of type 'long unsigned int&' to a value of type 'char' 9 | cin >>a >>' '>>b; | ^~~ /usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:7: note: conversion of argument 1 would be ill-formed: a.cc:9:19: error: cannot bind non-const lvalue reference of type 'long long int&' to a value of type 'char' 9 | cin >>a >>' '>>b; | ^~~ /usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:7: note: conversion of argument 1 would be ill-formed: a.cc:9:19: error: cannot bind non-const lvalue reference of type 'long long unsigned int&' to a value of type 'char' 9 | cin >>a >>' '>>b; | ^~~ /usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 219 | operator>>(float& __f) | ^~~~~~~~ /usr/include/c++/14/istream:219:7: note: conversion of argument 1 would be ill-formed: a.cc:9:19: error: cannot bind non-const lvalue reference of type 'float&' to a value of type 'char' 9 | cin >>a >>' '>>b; | ^~~ /usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 223 | operator>>(double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:223:7: note: conversion of argument 1 would be ill-formed: a.cc:9:19: error: cannot bind non-const lvalue reference of type 'double&' to a value of type 'char' 9 | cin >>a >>' '>>b; | ^~~ /usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 227 | operator>>(long double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:227:7: note: conversion of argument 1 would be ill-formed: a.cc:9:19: error: cannot bind non-const lvalue reference of type 'long double&' to a value of type 'char' 9 | cin >>a >>' '>>b; | ^~~ /usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:7: note: conversion of argument 1 would be ill-formed: a.cc:9:19: error: invalid conversion from 'char' to 'void*' [-fpermissive] 9 | cin >>a >>' '>>b; | ^~~ | | | char a.cc:9:19: error: cannot bind rvalue '(void*)32' to 'void*&' /usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:122:7: note: conversion of argument 1 would be ill-formed: a.cc:9:19: error: invalid conversion from 'char' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} [-fpermissive] 9 | cin >>a >>' '>>b; | ^~~ | | | char /usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' (near match) 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:126:7: note: conversion of argument 1 would be ill-formed: a.cc:9:19: error: invalid conversion from 'char' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} [-fpermissive] 9 | cin >>a >>' '>>b; | ^~~ | | | char /usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 133
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 po = pow(10, n); if (!((sum % po) == sum)) n++; else break; } cout << n << endl; } }
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(x3); System.out.println(s1.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 { | ^~~~~~
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') { count++; } i++; } i=0; while(i<strlen(c2)) { if(c2[i]!='0') { count++; } i++; } cout<<count<<endl; count=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(" "); int length = String.valueOf(Integer.parseInt(line[0]) + Integer.parseInt(line[1])).length(); System.out.println(length); }catch(NullPointerException e) { break; } } } }
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 with '-fmodules-ts' a.cc:4:1: error: expected unqualified-id before 'public' 4 | public class Main { | ^~~~~~
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 unqualified-id before '.' token 1 | while gets ;p $_.split(" ").map{|i|i.to_i}.inject(:+).to_s.size;end | ^ a.cc:1:65: error: 'end' does not name a type 1 | while gets ;p $_.split(" ").map{|i|i.to_i}.inject(:+).to_s.size;end | ^~~
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<imax+1;i++){ while(c[i]=>10){ c[i] =/ 10; digit[i]++; } } for(i=0;i<imax+1;i++)cout << digit[i] << endl; return 0; }
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] 14 | if(a[i]==NULL||b[i]==NULL) | ^~~~ a.cc:14:27: warning: NULL used in arithmetic [-Wpointer-arith] 14 | if(a[i]==NULL||b[i]==NULL) | ^~~~ a.cc:21:17: error: expected primary-expression before '>' token 21 | while(c[i]=>10){ | ^ a.cc:22:14: error: expected primary-expression before '/' token 22 | c[i] =/ 10; | ^
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; for(i=0;i<imax+1;i++){ while(c[i]=>10){ c[i] =/ 10; digit[i]++; } } for(i=0;i<imax+1;i++)cout << digit[i] << endl; return 0; }
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 arithmetic [-Wpointer-arith] 15 | if(a[i]==NULL||b[i]==NULL) | ^~~~ a.cc:22:17: error: expected primary-expression before '>' token 22 | while(c[i]=>10){ | ^ a.cc:23:14: error: expected primary-expression before '/' token 23 | c[i] =/ 10; | ^
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++){ while(c[i]>=10){ c[i] /= 10; digit[i]++; } } for(i=0;i<imax+1;i++)cout << digit[i] << endl; return 0; }
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-arith] 13 | if(a[i]==NULL||b[i]==NULL) | ^~~~
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(); // Console.WriteLine(Convert.ToInt32(a)); if (Convert.ToInt32(a) == 0) break; string d = ""; string b = ""; int c = 0; for (int i = 0; i <= a.Length - 1; i++) { if (a.Substring(i, 1) != " ") { d = d + a.Substring(i, 1); c += 1; } else { break; } } for (int i = c + 1; i <= a.Length - 1; i++) { b = b + a.Substring(i, 1); } c = int.Parse(b) + int.Parse(d); int z = 0; while (c != 0) { c = c / 10; z += 1; } Console.WriteLine(z); } } } }
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.Linq; | ^~~~~~ a.cc:4:7: error: expected nested-name-specifier before 'System' 4 | using System.Text; | ^~~~~~ a.cc:9:26: error: 'string' has not been declared 9 | static void Main(string[] args) | ^~~~~~ a.cc:9:35: error: expected ',' or '...' before 'args' 9 | static void Main(string[] args) | ^~~~ a.cc:46:6: error: expected ';' after class definition 46 | } | ^ | ; a.cc: In static member function 'static void ConsoleApplication1::Program::Main(int*)': a.cc:13:17: error: 'string' was not declared in this scope 13 | string a; | ^~~~~~ a.cc:14:17: error: 'a' was not declared in this scope 14 | a = Console.ReadLine(); | ^ a.cc:14:21: error: 'Console' was not declared in this scope 14 | a = Console.ReadLine(); | ^~~~~~~ a.cc:16:21: error: 'Convert' was not declared in this scope 16 | if (Convert.ToInt32(a) == 0) break; | ^~~~~~~ a.cc:17:24: error: expected ';' before 'd' 17 | string d = ""; | ^ a.cc:18:24: error: expected ';' before 'b' 18 | string b = ""; | ^ a.cc:24:25: error: 'd' was not declared in this scope 24 | d = d + a.Substring(i, 1); | ^ a.cc:34:21: error: 'b' was not declared in this scope 34 | b = b + a.Substring(i, 1); | ^ a.cc:36:21: error: expected primary-expression before 'int' 36 | c = int.Parse(b) + int.Parse(d); | ^~~
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){ k++; c = c/10; //System.out.println(c); } System.out.println(k); } } }
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]; | ^ a.cc:12:18: error: invalid types 'int[int]' for array subscript 12 | }while((a[i]<0||a[i]>100000)&&(b[i]<0||b[i]>100000)); | ^ a.cc:12:26: error: invalid types 'int[int]' for array subscript 12 | }while((a[i]<0||a[i]>100000)&&(b[i]<0||b[i]>100000)); | ^ a.cc:12:41: error: invalid types 'int[int]' for array subscript 12 | }while((a[i]<0||a[i]>100000)&&(b[i]<0||b[i]>100000)); | ^ a.cc:12:49: error: invalid types 'int[int]' for array subscript 12 | }while((a[i]<0||a[i]>100000)&&(b[i]<0||b[i]>100000)); | ^ a.cc:18:18: error: invalid types 'int[int]' for array subscript 18 | while(sum[i]/10!=0){ | ^ a.cc:19:20: error: invalid types 'int[int]' for array subscript 19 | sum[i] = sum[i]/10; | ^ a.cc:19:29: error: invalid types 'int[int]' for array subscript 19 | sum[i] = sum[i]/10; | ^
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 this scope 7 | while(cin >> a >> b){ | ^
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 | scanf("%d %d",&a,&b); | ^ a.cc:5:1: error: 'c' was not declared in this scope 5 | c=a+b; | ^ a.cc:6:5: error: 'i' was not declared in this scope 6 | for(i=0;c<10;i++){ | ^ a.cc:9:15: error: 'i' was not declared in this scope 9 | printf("%d\n",i); | ^
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 << "input two numbers" << endl; cin >> input; size = input.size(); i = input.find(" "); hoge = input.substr(0,i - 1); fuga = input.substr(i + 1); first = stoi(hoge); second = stoi(fuga); sum = first + second; piyo = to_string(sum); size = piyo.size(); cout << size << endl; } ~ ~ ~ ~ ~
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 not been declared 4 | public static void main(String[] args){ | ^~~~~~ a.cc:4:34: error: expected ',' or '...' before 'args' 4 | public static void main(String[] args){ | ^~~~ a.cc:15:2: error: expected ';' after class definition 15 | } | ^ | ; a.cc: In static member function 'static void Main::main(int*)': a.cc:7:1: error: 'Scanner' was not declared in this scope 7 | Scanner sc=new Scanner(System.in); | ^~~~~~~ a.cc:8:7: error: 'sc' was not declared in this scope 8 | while(sc.hasNextInt()){ | ^~ a.cc:11:12: error: 'Math' was not declared in this scope 11 | int d=(int)Math.log10(a+b); | ^~~~ a.cc:12:1: error: 'System' was not declared in this scope 12 | System.out.println(d); | ^~~~~~
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 this scope 5 | while(scanf("%d %d",&a,&b) != EOF) | ^ a.cc:7:1: error: 'sum' was not declared in this scope 7 | sum = a + b; | ^~~ a.cc:10:17: error: 'result' was not declared in this scope 10 | result++; | ^~~~~~ a.cc:12:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 12 | cout << result; | ^~~~ | std::cout In file included from a.cc:1: /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:12:17: error: 'result' was not declared in this scope 12 | cout << result; | ^~~~~~
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; } return i;5 } int main () { int in1,in2; int i; while (scanf ("%d %d",&in1,&in2)!=EOF) { int sum=in1+in2; int z=reshan(sum); printf ("%d\n",z); } return 0; }
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 ) { | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/iostream:42, from a.cc:1: /usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool&' 170 | operator>>(bool& __n) | ~~~~~~^~~ /usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int&' 174 | operator>>(short& __n); | ~~~~~~~^~~ /usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int&' 177 | operator>>(unsigned short& __n) | ~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int&' 181 | operator>>(int& __n); | ~~~~~^~~ /usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int&' 184 | operator>>(unsigned int& __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int&' 188 | operator>>(long& __n) | ~~~~~~^~~ /usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int&' 192 | operator>>(unsigned long& __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int&' 199 | operator>>(long long& __n) | ~~~~~~~~~~~^~~ /usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int&' 203 | operator>>(unsigned long long& __n) | ~~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 219 | operator>>(float& __f) | ^~~~~~~~ /usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float&' 219 | operator>>(float& __f) | ~~~~~~~^~~ /usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 223 | operator>>(double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double&' 223 | operator>>(double& __f) | ~~~~~~~~^~~ /usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 227 | operator>>(long double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double&' 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'void*&' 328 | operator>>(void*& __p) | ~~~~~~~^~~ /usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ^~~~~~~~ /usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]' 352 | operator>>(__streambuf_type* __sb); | ^~~~~~~~ /usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'} 352 | ope
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](const int x){return sum < x; }); auto output = result - t.begin() + 1; cout << output << endl; } return 0; }
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](const int x){return sum < x; }); auto output = result - t.begin() + 1; cout << output << endl; } return 0; }
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 68 | typedef ptrdiff_t streamsize; // Signed integral type | ^~~~~~~~~ /usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 40 | #include <cwchar> // For mbstate_t +++ |+#include <cstddef> 41 | In file included from /usr/include/c++/14/bits/char_traits.h:50: /usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std' 666 | struct is_null_pointer<std::nullptr_t> | ^~~~~~~~~ /usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid 666 | struct is_null_pointer<std::nullptr_t> | ^ /usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid 670 | struct is_null_pointer<const std::nullptr_t> | ^ /usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid 674 | struct is_null_pointer<volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid 678 | struct is_null_pointer<const volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^~~~~~ In file included from /usr/include/wchar.h:35, from /usr/include/c++/14/cwchar:44, from /usr/include/c++/14/bits/postypes.h:40: /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^ /usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1438 | : public integral_constant<std::size_t, 0> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid 1438 | : public integral_constant<std::size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared 1440 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope 1441 | struct rank<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid 1441 | struct rank<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:2086:26: error: 'std::size_t' has not been declared 2086 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2087:30: error: '_Size' was not declared in this scope 2087 | struct remove_extent<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2087:36: error: template argument 1 is invalid 2087 | struct remove_extent<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2099:26: error: 'std::size_t' has not been declared 2099 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2100:35: error: '_Size' was not declared in this scope 2100 | struct remove_all_extents<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2100:41: error: template argument 1 is invalid 2100 | struct remove_all_extents<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2171:12: error: 'std::size_t' has not been declared 2171 | template<std::size_t _Len> | ^~~ /usr/include/c++/14/type_traits:2176:30: error: '_Len' was not declared in this scope 2176 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2194:12: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2194:30: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2195:55: error: '_Len' was not declared in this scope 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^~~~ /usr/include/c++/14/type_traits:2195:59: error: template argument 1 is invalid 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^ /usr/include/c++/14/type_traits:2202:30: error: '_Len' was not declared in this scope 2202 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2203:44: error: '_Align' was not declared in this scope 2203 | struct __attribute__((__aligned__((_Align)))) { } __align; | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:144:61: error: 'std::size_t' has not been declared 144 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:146:40: error: 'size_t' in namespace 'std' does not name a type 146 | static _GLIBCXX14_CONSTEXPR std::size_t | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:150:34: error: 'std::size_t' has not been declared 150 | find(const char_type* __s, std::size_t __n, const char_type& __a); | ^~~ /usr/include/c++/14/bits/char_traits.h:153:52: error: 'std::size_t' has not been declared 153 | move(char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:156:52: error: 'std::size_t' has not been declared 156 | copy(char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:159:30: error: 'std::size_t' has not been declared 159 | assign(char_type* __s, std::size_t __n, char_type __a); | ^~~ /usr/include/c++/14/bits/char_traits.h:187:59: error: 'std::size_t' has not been declared 187 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n) | ^~~ /usr/include/c++/14/bits/char_traits.h: In static member function 'static constexpr int __gnu_cxx::char_traits<_CharT>::compare(const char_type*, const char_type*, int)': /usr/include/c++/14/bits/char_traits.h:189:17: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 189 | for (std::size_t __i = 0; __i < __n; ++__i) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:189:33: error: '__i' was not declared in this scope; did you mean '__n'? 189 | for (std::size_t __i = 0; __i < __n; ++__i) | ^~~ | __n /usr/include/c++/14/bits/char_traits.h: At global scope: /usr/include/c++/14/bits/char_traits.h:198:31: error: 'size_t' in namespace 'std' does not name a type 198 | _GLIBCXX14_CONSTEXPR std::size_t |
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 = a / 10; 12 i++; 13 } 14 15 cout << i << endl; 16 17 } 18 }
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 numeric constant 4 | 4 int main(){ | ^
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 0; }
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; } return 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; } return 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.cc:4:33: error: 'String' has not been declared 4 | public static void main(String args[]){ | ^~~~~~ a.cc:13:2: error: expected ';' after class definition 13 | } | ^ | ; a.cc: In static member function 'static void Main::main(int*)': a.cc:5:17: error: 'Scanner' was not declared in this scope 5 | Scanner in = new Scanner(System.in); | ^~~~~~~ a.cc:6:23: error: 'in' was not declared in this scope; did you mean 'int'? 6 | while(in.hasNext()){ | ^~ | int a.cc:9:38: error: 'Math' was not declared in this scope 9 | int c = (int)Math.log10(a+b) + 1; | ^~~~ a.cc:10:25: error: 'System' was not declared in this scope 10 | System.out.println(c); | ^~~~~~
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, from a.cc:2: /usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type 68 | typedef ptrdiff_t streamsize; // Signed integral type | ^~~~~~~~~ /usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 40 | #include <cwchar> // For mbstate_t +++ |+#include <cstddef> 41 | In file included from /usr/include/c++/14/bits/exception_ptr.h:38, from /usr/include/c++/14/exception:166, from /usr/include/c++/14/ios:41: /usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function 131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ In file included from /usr/include/wchar.h:35, from /usr/include/c++/14/cwchar:44, from /usr/include/c++/14/bits/postypes.h:40: /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive] 132 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive] 134 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/14/new:140:29: error: 'std::size_t' has not been declared 140 | void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT | ^~~ /usr/include/c++/14/new:142:31: error: 'std::size_t' has not been declared 142 | void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT | ^~~ /usr/include/c++/14/new:145:26: error: declaration of 'operator new' as non-function 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:145:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:145:52: error: expected primary-expression before 'const' 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~ /usr/include/c++/14/new:147:26: error: declaration of 'operator new []' as non-function 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:147:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:147:54: error: expected primary-expression before 'const' 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~ /usr/include/c++/14/new:154:26: error: declaration of 'operator new' as non-function 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/14/new:154:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:154:68: error: expected primary-expression before ')' token 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^ /usr/include/c++/14/new:155:73: error: attributes after parenthesized initializer ignored [-fpermissive] 155 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); | ^ /usr/include/c++/14/new:156:26: error: declaration of 'operator new' as non-function 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/14/new:156:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:156:68: error: expected primary-expression before ',' token 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^ /usr/include/c++/14/new:156:70: error: expected primary-expression before 'const' 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~ /usr/include/c++/14/new:162:26: error: declaration of 'operator new []' as non-function 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/14/new:162:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:162:70: error: expected primary-expression before ')' token 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^ /usr/include/c++/14/new:163:73: error: attributes after parenthesized initializer ignored [-fpermissive] 163 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); | ^ /usr/include/c++/14/new:164:26: error: declaration of 'operator new []' as non-function 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/14/new:164:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:164:70: error: expected primary-expression before ',' token 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^ /usr/include/c++/14/new:164:72: error: expected primary-expression before 'const' 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~ /usr/include/c++/14/new:171:29: error: 'std::size_t' has not been declared 171 | void operator delete(void*, std::size_t, std::align_val_t) | ^~~ /usr/include/c++/14/new:173:31: error: 'std::size_t' has not been declared 173 | void operator delete[](void*, std::size_t, std::align_val_t) | ^~~ /usr/include/c++/14/new:179:33: error: declaration of 'operator new' as non-function 179 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:179:51: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 179 | _GLIBCXX_N
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++; } cout<<ans<<endl; } return 0;
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 | ans=1; | ~~~
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.cc:11:18: error: expected ';' before 'ans' 11 | i | ^ | ; 12 | //-------------- 13 | ans=1; | ~~~
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++; } cout<<ans<<endl; } return 0; }
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-expression before 'for' 11 | for(int i=0;i<104;i++){ | ^~~ a.cc:11:21: error: 'i' was not declared in this scope 11 | for(int i=0;i<104;i++){ | ^
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 << "5" << endl; else if (a + b < 1000000) cout << "6" << endl; else if (a + b < 10000000) cout << "7" << endl; else if (a + b < 100000000) cout << "8" << endl; else if (a + b < 10000000000) cout << "9" << endl; } return 0; }
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; ///< Linked to standard input | ^~~ a.cc:8:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 8 | cout<<a<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:8:10: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 8 | cout<<a<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
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 '}' at end of input 11 | }; | ^ a.cc:2:11: note: to match this '{' 2 | int main(){ | ^
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() << endl; | ^~~~ a.cc:7:13: error: 'to_string' was not declared in this scope 7 | cout << to_string(a+b).size() << endl; | ^~~~~~~~~ a.cc:7:38: error: 'endl' was not declared in this scope 7 | cout << to_string(a+b).size() << endl; | ^~~~
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() << endl; | ^~~~ a.cc:7:13: error: 'to_string' was not declared in this scope 7 | cout << to_string(a+b).size() << endl; | ^~~~~~~~~ a.cc:7:38: error: 'endl' was not declared in this scope 7 | cout << to_string(a+b).size() << endl; | ^~~~
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:3: error: expected ':' before 'int' 4 | ?? int a, b; | ^~~~ | : a.cc:4:4: error: expected primary-expression before 'int' 4 | ?? int a, b; | ^~~ a.cc:4:3: error: expected ':' before 'int' 4 | ?? int a, b; | ^~~~ | : a.cc:4:4: error: expected primary-expression before 'int' 4 | ?? int a, b; | ^~~ a.cc:5:1: error: expected primary-expression before '?' token 5 | ?? int cou; | ^ a.cc:5:2: error: expected primary-expression before '?' token 5 | ?? int cou; | ^ a.cc:5:4: error: expected primary-expression before 'int' 5 | ?? int cou; | ^~~ a.cc:5:3: error: expected ':' before 'int' 5 | ?? int cou; | ^~~~ | : a.cc:5:4: error: expected primary-expression before 'int' 5 | ?? int cou; | ^~~ a.cc:5:3: error: expected ':' before 'int' 5 | ?? int cou; | ^~~~ | : a.cc:5:4: error: expected primary-expression before 'int' 5 | ?? int cou; | ^~~ a.cc:6:1: error: expected primary-expression before '?' token 6 | ?? while (scanf("%d %d", &a, &b) != EOF){ | ^ a.cc:6:2: error: expected primary-expression before '?' token 6 | ?? while (scanf("%d %d", &a, &b) != EOF){ | ^ a.cc:6:4: error: expected primary-expression before 'while' 6 | ?? while (scanf("%d %d", &a, &b) != EOF){ | ^~~~~ a.cc:6:3: error: expected ':' before 'while' 6 | ?? while (scanf("%d %d", &a, &b) != EOF){ | ^~~~~~ | : a.cc:6:4: error: expected primary-expression before 'while' 6 | ?? while (scanf("%d %d", &a, &b) != EOF){ | ^~~~~ a.cc:6:3: error: expected ':' before 'while' 6 | ?? while (scanf("%d %d", &a, &b) != EOF){ | ^~~~~~ | : a.cc:6:4: error: expected primary-expression before 'while' 6 | ?? while (scanf("%d %d", &a, &b) != EOF){ | ^~~~~ a.cc:15:1: error: expected primary-expression before '?' token 15 | ?? return 0; | ^ a.cc:15:2: error: expected primary-expression before '?' token 15 | ?? return 0; | ^ a.cc:15:4: error: expected primary-expression before 'return' 15 | ?? return 0; | ^~~~~~ a.cc:15:3: error: expected ':' before 'return' 15 | ?? return 0; | ^~~~~~~ | : a.cc:15:4: error: expected primary-expression before 'return' 15 | ?? return 0; | ^~~~~~ a.cc:15:3: error: expected ':' before 'return' 15 | ?? return 0; | ^~~~~~~ | : a.cc:15:4: error: expected primary-expression before 'return' 15 | ?? return 0; | ^~~~~~
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 = str.split(" "); for(int h=0;h<array.length/2;h++){ for (int i = 0; i < 2; i++) { num[i] = Integer.parseInt(array[i+h*2]); } int answer =(int)Math.log10( num[0]+num[1])+ 1; System.out.println(answer); } } catch (IOException e) { e.printStackTrace(); } } }
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 '-fmodules-ts' a.cc:4:1: error: 'import' does not name a type 4 | import java.io.InputStreamReader; | ^~~~~~ a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:6:1: error: expected unqualified-id before 'public' 6 | public class Main { | ^~~~~~
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("%d\n",count); | ^~~~~~ a.cc:22:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' 21 | #include<stdio.h> +++ |+#include <cstdio> 22 |
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] | std::istream {aka std::basic_istream<char>} 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, from a.cc:1: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:15:20: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::fpos<_StateT>' 15 | while(cin=="\n\n"){ | ^~~~~~ In file included from /usr/include/c++/14/string:43, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:15:20: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::allocator<_CharT>' 15 | while(cin=="\n\n"){ | ^~~~~~ In file included from /usr/include/c++/14/string:48: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:15:20: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 15 | while(cin=="\n\n"){ | ^~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:15:20: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 15 | while(cin=="\n\n"){ | ^~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:15:20: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 15 | while(cin=="\n\n"){ | ^~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:15:20: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 15 | while(cin=="\n\n"){ | ^~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:15:20: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>' 15 | while(cin=="\n\n"){ | ^~~~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 629 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed: a.cc:15:20: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 15 | while(cin=="\n\n"){ | ^~~~~~ /usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 637 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:637:5: note: template argument deduction/substitution failed: a.cc:15:20: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 15 | while(cin=="\n\n"){ | ^~~~~~ /usr/include/c++/14/string_view:644:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 644 | operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:644:5: note: template argument deduction/substitution failed: a.cc:15:20: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'const char*' 15 | while(cin=="\n\n"){ | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:3755:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3755 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3755:5: note: template argument deduction/substitution failed: a.cc:15:20: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 15 | while(cin=="\n\n"){ | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:3772:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3772:5: note: template argument deduction/substitution failed: a.cc:15:20: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 15 | while(cin=="\n\n"){ | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:3819:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3819 | operator==(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3819:5: note: template argument deduction/substitution failed: a.cc:15:20: note: mismatched types 'const _CharT*' and 'std::basic_istream<char>' 15 | while(cin=="\n\n"){ | ^~~~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2558:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2558 | operator==(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2558:5: note: template argument deduction/substitution failed: a.cc:15:20: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::tuple<_UTypes ...>' 15 | while(cin=="\n\n"){ | ^~~~~~ In file included from /usr/include/c++/14/bits/locale_facets.h:48, from /usr/include/c++/14/bits/basic_ios.h:37, from /usr/include/c++/14/ios:46: /usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: candidate: 'template<class _CharT, class _Traits> bool std::operator==(const istreambuf_iterator<_CharT, _Traits>&, const istreambuf_iterator<_CharT, _Traits>&)' 234 | operator==(const istreambuf_iterator<_CharT, _Traits>& __a, | ^~~~~~~~ /usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: template argument deduction/substitution failed: a.cc:15:20: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::istreambuf_iterator<_CharT, _Traits>' 15 | while(cin=="\n\n"){ | ^~~~~~ In file included from /usr/include/c++/14/bits/io
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;){ | ^ a.cc:17:2: error: expected '}' at end of input 17 | } | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
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 | } | ~