submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s564194354
p03775
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,c; int d=0; cin>>a; for(int i=1;i<=a;i++) if(a%i==0){ if(c==i){ for(int j++;a/c!=0;j++){ a/c=a/c/10; d++; break; } c=i; } cout<<d; }
a.cc: In function 'int main()': a.cc:11:17: error: expected ';' before '++' token 11 | for(int j++;a/c!=0;j++){ | ^~ | ; a.cc:11:19: error: expected primary-expression before ';' token 11 | for(int j++;a/c!=0;j++){ | ^ a.cc:11:26: error: expected ')' before ';' token 11 | for(int j++;a/c!=0;j++){ | ~ ^ | ) a.cc:11:27: error: 'j' was not declared in this scope 11 | for(int j++;a/c!=0;j++){ | ^ a.cc:19:2: error: expected '}' at end of input 19 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s452302755
p03775
C++
#include<bits/stdc++.h> using namespace std; using ll=long long; int cnt(ll n){ int digits=0; while(n>0){ n/=10; digits++; } return digits; } int main(){ ll n; cin>>n; const int ans=cnt(n); for(ll a=1LL;a*a<=n;a++){ if(n%a!=0)continue; const ll b=n/a; const int cur=max(cnt(a),cnt(b)); ans=min(ans,cur); } cout<<ans<<endl; }
a.cc: In function 'int main()': a.cc:21:8: error: assignment of read-only variable 'ans' 21 | ans=min(ans,cur); | ~~~^~~~~~~~~~~~~
s280491184
p03775
C++
#include <bits/stdc++.h> #include <math.h> using namespace std; int NumberOfFigure(long long X){ long long count = 1; if( X > 9 ){ count = 0; for( int i = 0; i < 10; i++ ){ if( X == 0 ){ break; } else{ count += 1; X /= 10; } } } return count; } int main(){ long long N; long long n = floor(sqrt(N)); for(long long i = 1; i < n; i++){ for(long long j = n; j < N; j++){ if(i * j == N){ int keta = NumberOfFigure(j); break; } } } cout << keta << endl; }
a.cc: In function 'int main()': a.cc:35:17: error: 'keta' was not declared in this scope 35 | cout << keta << endl; | ^~~~
s324711122
p03775
C++
#include <bits/stdc++.h> #include <math.h> using namespace std; int NumberOfFigure(long long X){ long long count = 1; if( X > 9 ){ count = 0; for( int i = 0; i < 10; i++ ){ if( X == 0 ){ break; } else{ count += 1; X /= 10; } } } return count; } int main(){ long long N; long long n = floor(sqrt(N)); for(long long i = 1; i < n; i++){ for(long long j = n; j < N; j++){ if(i * J == N){ int keta = NumberOfFigure(j); break; } } } cout << keta << endl; }
a.cc: In function 'int main()': a.cc:28:32: error: 'J' was not declared in this scope 28 | if(i * J == N){ | ^ a.cc:35:17: error: 'keta' was not declared in this scope 35 | cout << keta << endl; | ^~~~
s879400722
p03775
C++
#include <bits/stdc++.h> using namespace std; int main(){ unsigned long long int a,d; cin>>a; d=a; int b,c,e,f; e=1; f=100; for(int i=1;i<d;i++){ if(d/10>1000000) d/=1000; if(a%i==0){ b=i; c=a%i; c=max(b,c) for(int j=0;j<100;j++){ if(c/10>9){ c=c/10; e++; } else break; } } } if(f>e){ f=e; } cout<<f<<endl; }
a.cc: In function 'int main()': a.cc:17:16: error: expected ';' before 'for' 17 | c=max(b,c) | ^ | ; 18 | for(int j=0;j<100;j++){ | ~~~ a.cc:18:18: error: 'j' was not declared in this scope 18 | for(int j=0;j<100;j++){ | ^
s967333914
p03775
C++
#include <bits/stdc++.h> using namespace std; int main(){ unsigned long long int a,c,d; cin>>a; d=a; int b,e,f; e=1; f=100; for(int i=1;i<d;i++){ if(d/10>1000000) d/=1000; if(a%i==0){ b=i; c=a%i; c=max(b,c) for(int j=0;j<100;j++){ if(c/10>9){ c=c/10; e++; } else break; } } } if(f>e){ f=e; } cout<<f<<endl; }
a.cc: In function 'int main()': a.cc:17:11: error: no matching function for call to 'max(int&, long long unsigned int&)' 17 | c=max(b,c) | ~~~^~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)' 257 | max(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:257:5: note: template argument deduction/substitution failed: a.cc:17:11: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'long long unsigned int') 17 | c=max(b,c) | ~~~^~~~~ /usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)' 303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate expects 3 arguments, 2 provided In file included from /usr/include/c++/14/algorithm:61: /usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)' 5706 | max(initializer_list<_Tp> __l) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate expects 1 argument, 2 provided /usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)' 5716 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5716:5: note: template argument deduction/substitution failed: a.cc:17:11: note: mismatched types 'std::initializer_list<_Tp>' and 'int' 17 | c=max(b,c) | ~~~^~~~~ a.cc:18:18: error: 'j' was not declared in this scope 18 | for(int j=0;j<100;j++){ | ^
s854807128
p03775
C++
#include <bits/stdc++.h> using namespace std; int main(){ unsigned long long int a,c,d; cin>>a; d=a; int b,e,f; e=1; f=100; for(int i=1;i<d;i++){ if(d/10>1000000) d/=1000; if(a%i=0){ b=i; c=a%i; c=max(b,c) for(int j=0;j<100;j++){ if(c/10>9){ c=c/10; e++; } else break; } } } if(f>e){ f=e; } cout<<f<<endl; }
a.cc: In function 'int main()': a.cc:14:9: error: lvalue required as left operand of assignment 14 | if(a%i=0){ | ~^~ a.cc:17:11: error: no matching function for call to 'max(int&, long long unsigned int&)' 17 | c=max(b,c) | ~~~^~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)' 257 | max(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:257:5: note: template argument deduction/substitution failed: a.cc:17:11: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'long long unsigned int') 17 | c=max(b,c) | ~~~^~~~~ /usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)' 303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate expects 3 arguments, 2 provided In file included from /usr/include/c++/14/algorithm:61: /usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)' 5706 | max(initializer_list<_Tp> __l) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate expects 1 argument, 2 provided /usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)' 5716 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5716:5: note: template argument deduction/substitution failed: a.cc:17:11: note: mismatched types 'std::initializer_list<_Tp>' and 'int' 17 | c=max(b,c) | ~~~^~~~~ a.cc:18:18: error: 'j' was not declared in this scope 18 | for(int j=0;j<100;j++){ | ^
s338538717
p03775
C++
#include <bits/stdc++.h> using namespace std; int main(){ float N; int a,b; cin >> N; for(int i=pow(N,0.5);0<i;i--){ if(N%i==0){ a=i; b=N/i; break; } } for(float i=0.0;;i++){ if(a%pow(10.0,i)==a){ a=i; break; } for(float i=0.0;;i++){ if(b%pow(10.0,i)==a){ b=i; break; } cout << a+b; }
a.cc: In function 'int main()': a.cc:10:9: error: invalid operands of types 'float' and 'int' to binary 'operator%' 10 | if(N%i==0){ | ~^~ | | | | | int | float a.cc:17:9: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%' 17 | if(a%pow(10.0,i)==a){ | ~^~~~~~~~~~~~ | | | | int __gnu_cxx::__promote<double>::__type {aka double} a.cc:22:9: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%' 22 | if(b%pow(10.0,i)==a){ | ~^~~~~~~~~~~~ | | | | int __gnu_cxx::__promote<double>::__type {aka double} a.cc:27:2: error: expected '}' at end of input 27 | } | ^ a.cc:16:24: note: to match this '{' 16 | for(float i=0.0;;i++){ | ^ a.cc:27:2: error: expected '}' at end of input 27 | } | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s879007377
p03775
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N,a,b; cin >> N; for(int i=pow(N,0.5);0<i;i--){ if(N%i==0){ a=i; b=N/i; break; } } for(int i=0;;i++){ if(a%pow(10,i)==a){ a=i; break; } for(int i=0;;i++){ if(b%pow(10,i)==a){ b=i; break; } cout << a+b; }
a.cc: In function 'int main()': a.cc:16:9: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%' 16 | if(a%pow(10,i)==a){ | ~^~~~~~~~~~ | | | | int __gnu_cxx::__promote<double>::__type {aka double} a.cc:21:9: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%' 21 | if(b%pow(10,i)==a){ | ~^~~~~~~~~~ | | | | int __gnu_cxx::__promote<double>::__type {aka double} a.cc:26:2: error: expected '}' at end of input 26 | } | ^ a.cc:15:20: note: to match this '{' 15 | for(int i=0;;i++){ | ^ a.cc:26:2: error: expected '}' at end of input 26 | } | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s593738272
p03775
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N,a,b; cin >> N; for(int i=pow(N,0.5);0<i;i--){ if(N%i==0){ a=i; b=N/i; break; } } for(int i=0;;i++){ if(a%pow(10,i)==a){ a=i; break; } for(int i=0;;i++){ if(b%pow(10,i)==a){ b=i; break; } cout << a+b; }
a.cc: In function 'int main()': a.cc:16:9: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%' 16 | if(a%pow(10,i)==a){ | ~^~~~~~~~~~ | | | | int __gnu_cxx::__promote<double>::__type {aka double} a.cc:21:9: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%' 21 | if(b%pow(10,i)==a){ | ~^~~~~~~~~~ | | | | int __gnu_cxx::__promote<double>::__type {aka double} a.cc:26:2: error: expected '}' at end of input 26 | } | ^ a.cc:15:20: note: to match this '{' 15 | for(int i=0;;i++){ | ^ a.cc:26:2: error: expected '}' at end of input 26 | } | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s529790249
p03775
Java
import java.util.stream.LongStream; public class Main { public static void main(String[] args) { java.util.Scanner s = new java.util.Scanner(System.in); System.out.println(Main.calc(s.nextLong())); } public static long calc(long n) { return LongStream.rangeClosed(1, (int) Math.sqrt(n)) .filter(a -> n % a == 0) .map(a -> Main.calcF(a, n / a)).min().getAsLong(); } public static int calcF(long a, long b) { return Math.max((int) (Math.log10(a) + 1), (int) (Math.log10(b) + 1)); }
Main.java:17: error: reached end of file while parsing } ^ 1 error
s678510061
p03775
C++
9876543210
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 9876543210 | ^~~~~~~~~~
s127478991
p03775
C++
#include <bits/stdc++.h> using namespace std; int main(){ long long int N = 0; long long int B = 0; long long int c = 1; long long int i = 10; int num = 1; int ans = 0; cin >> N; for (c=1;c*c<=N;c++){ if(N%c==0){ B = n / c; while(B/i>0){ num = num + 1; i = i *10; } } else{ continue; } if (ans < num ){ ans = num; } } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:17:11: error: 'n' was not declared in this scope 17 | B = n / c; | ^
s975851600
p03775
C++
#include <bits/stdc++.h> using namespace std; int main(){ long long int N = 0; long long int B = 0; long long int c = 1; long long int i = 10; int num = 1; int ans = 0; cin >> N; for (c=1;c*c<=N;c++){ if(N%c==0){ while(B/i>0){ num = num + 1; i = i *10; } } else{ continue; } if (ans < num ){ ans = num; } } cout >> ans >> endl; }
a.cc: In function 'int main()': a.cc:30:8: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 30 | cout >> ans >> endl; | ~~~~ ^~ ~~~ | | | | | int | std::ostream {aka std::basic_ostream<char>} a.cc:30:8: note: candidate: 'operator>>(int, int)' (built-in) 30 | cout >> ans >> endl; | ~~~~~^~~~~~ a.cc:30:8: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int' In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41, from a.cc:1: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:30:3: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 30 | cout >> ans >> endl; | ^~~~ In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:30:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 30 | cout >> ans >> endl; | ^~~ /usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)' 1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x) | ^~~~~~~~ /usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed: a.cc:30:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 30 | cout >> ans >> endl; | ^~~ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:30:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 30 | cout >> ans >> endl; | ^~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:30:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 30 | cout >> ans >> endl; | ^~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:30:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 30 | cout >> ans >> endl; | ^~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:30:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 30 | cout >> ans >> endl; | ^~~ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:30:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 30 | cout >> ans >> endl; | ^~~ /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:30:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 30 | cout >> ans >> endl; | ^~~ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: /usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int&]': a.cc:30:11: required from here 30 | cout >> ans >> endl; | ^~~ /usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)' 509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x) | ^~~~~~~~ /usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed: a.cc:30:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 30 | cout >> ans >> endl; | ^~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143: /usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)' 76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed: a.cc:30:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 30 | cout >> ans >> endl; | ^~~ /usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)' 106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed: a.cc:30:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 30 | cout >> ans >> endl; | ^~~ /usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)' 137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed: a.cc:30:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 30 | cout >> ans >> endl; | ^~~ /usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)' 177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed: a.cc:30:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 30 | cout >> ans >> endl; | ^~~ /usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)' 207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:207:5: note: template argument deduction/substitution failed: a.cc:30:11: note: 'std::ostream' {aka 'std::basic_ostr
s475966677
p03775
C++
#include <bits/stdc++.h> using namespace std; int main() { long long int N; cin>>N; int ans=15; for(long long int i=1; i*i<=N; i++) { if(N%i==0) { long long int Y=N/i; string y=Y, x=i; int Z; Z=max(x.size(), y.size()); ans=min(ans, Z); } } cout<<ans; return 0; }
a.cc: In function 'int main()': a.cc:12:16: error: conversion from 'long long int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested 12 | string y=Y, x=i; | ^ a.cc:12:21: error: conversion from 'long long int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested 12 | string y=Y, x=i; | ^
s094481334
p03775
C++
#include <bits/stdc++.h> using namespace std; int main() { long long int N; cin>>N; int ans=15; for(long long int i=1; i*i<=N; i++) { if(N%i==0) { int Y=N/i; string y=Y, x=i; int Z; Z=max(x.size(), y.size()); ans=min(ans, Z); } } cout<<ans; return 0; }
a.cc: In function 'int main()': a.cc:12:16: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested 12 | string y=Y, x=i; | ^ a.cc:12:21: error: conversion from 'long long int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested 12 | string y=Y, x=i; | ^
s322038013
p03775
C++
using namespace std; typedef long long ll; ///定義場所/// ll i, j, k, l, m, n; ll N, M, K; ll MOD = 1000000007; ll ans = 1000000000; //関数リスト// int ctoi(char c) { switch (c) { case '0': return 0; case '1': return 1; case '2': return 2; case '3': return 3; case '4': return 4; case '5': return 5; case '6': return 6; case '7': return 7; case '8': return 8; case '9': return 9; default: return 0; } } //(注)pairの型・比較する場所(first/second)は毎回変えて使用する bool pairCompare(const pair<ll, ll> firstElof, pair<ll, ll> secondElof) { return firstElof.second > secondElof.second; } ////////////// int Keta(ll X) { int keta = 1; while (X / 10 > 0) { X /= 10; keta++; } return keta; } int main() { cin >> N; i = 2; ll res = N; vector<ll> B; B.push_back(N); while (res > 1) { if (res % i == 0) { res /= i; B.push_back(res); } else if(i*i>N){ B.push_back(1); break; } else { i++; } } int ans = 10000; for (i = 0; i < B.size(); i++) { ans = min(Keta(max(B[i], N / B[i])), ans); } cout << ans; }
a.cc:28:24: error: 'pair' does not name a type 28 | bool pairCompare(const pair<ll, ll> firstElof, pair<ll, ll> secondElof) | ^~~~ a.cc:28:28: error: expected ',' or '...' before '<' token 28 | bool pairCompare(const pair<ll, ll> firstElof, pair<ll, ll> secondElof) | ^ a.cc: In function 'bool pairCompare(int)': a.cc:30:16: error: 'firstElof' was not declared in this scope 30 | return firstElof.second > secondElof.second; | ^~~~~~~~~ a.cc:30:35: error: 'secondElof' was not declared in this scope 30 | return firstElof.second > secondElof.second; | ^~~~~~~~~~ a.cc: In function 'int main()': a.cc:44:9: error: 'cin' was not declared in this scope 44 | cin >> N; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | a.cc:47:9: error: 'vector' was not declared in this scope 47 | vector<ll> B; | ^~~~~~ a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' +++ |+#include <vector> 1 | a.cc:47:18: error: expected primary-expression before '>' token 47 | vector<ll> B; | ^ a.cc:47:20: error: 'B' was not declared in this scope 47 | vector<ll> B; | ^ a.cc:64:32: error: 'max' was not declared in this scope 64 | ans = min(Keta(max(B[i], N / B[i])), ans); | ^~~ a.cc:64:23: error: 'min' was not declared in this scope; did you mean 'main'? 64 | ans = min(Keta(max(B[i], N / B[i])), ans); | ^~~ | main a.cc:66:9: error: 'cout' was not declared in this scope 66 | cout << ans; | ^~~~ a.cc:66:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
s604350408
p03775
C++
#include "bits/stdc++.h" using namespace std; using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; using vi = vector<int>; using vl = vector<ll>; using vvi = vector<vi>; using vvl = vector<vl>; const int INF = 1 << 28; const ll MOD = 1000000007; template <class T> bool chmax(T &a, const T &b) { return (a < b) ? (a = b, 1) : 0; } template <class T> bool chmin(T &a, const T &b) { return (b < a) ? (a = b, 1) : 0; } int main() { ll n; cin >> n; set<ll> facs = factors(n); ll ret = 10; for (ll i = 1; i * i <= n; ++i) { if (n % i == 0) { ll a = 0; ll b = 0; ll ii = i; ll ni = n / i; while (ii != 0) { a++; ii /= 10; } while (ni != 0) { b++; ni /= 10; } ll maxab = max(a, b); chmin(ret, maxab); } } cout << ret << "\n"; return 0; }
a.cc: In function 'int main()': a.cc:24:20: error: 'factors' was not declared in this scope; did you mean 'facs'? 24 | set<ll> facs = factors(n); | ^~~~~~~ | facs
s160985222
p03775
C++
#include <bits/stdc++.h> using namespace std; int main() { long long int N; cin>>N; int ans=15; for(long long int i=1; i*i<=N; i++) { if(N%i==0) { string y; y=to_string(N/i); ans=min(ans, y.size()); } } cout<<ans; }
a.cc: In function 'int main()': a.cc:13:14: error: no matching function for call to 'min(int&, std::__cxx11::basic_string<char>::size_type)' 13 | ans=min(ans, y.size()); | ~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)' 233 | min(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:233:5: note: template argument deduction/substitution failed: a.cc:13:14: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}) 13 | ans=min(ans, y.size()); | ~~~^~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)' 281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate expects 3 arguments, 2 provided In file included from /usr/include/c++/14/algorithm:61: /usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)' 5686 | min(initializer_list<_Tp> __l) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate expects 1 argument, 2 provided /usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)' 5696 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5696:5: note: template argument deduction/substitution failed: a.cc:13:14: note: mismatched types 'std::initializer_list<_Tp>' and 'int' 13 | ans=min(ans, y.size()); | ~~~^~~~~~~~~~~~~~~
s648764392
p03775
C++
#include <bits/stdc++.h> using namespace std; int main() { long long int N; cin>>N; int ans=15; for(long long int i=1; i*i<=N; i++) { if(N%i==0) { long long int y=N/i; ans=min(ans, y.size()) } } cout<<ans; }
a.cc: In function 'int main()': a.cc:12:22: error: request for member 'size' in 'y', which is of non-class type 'long long int' 12 | ans=min(ans, y.size()) | ^~~~
s289316447
p03775
C++
#include <bits/stdc++.h> using namespace std; int main() { long N; double rrN; int rN,A,B,digit; digit = 0; cin >> N; rrN = sqrt(N); rN = rrN; Ns=N; for(int i=0;true;i++){ if(N%(rN-i)!=0) continue; else{ A=rN-i; break; } } B=N/A; digit = log10(B) + 1; cout << digit <<endl; }
a.cc: In function 'int main()': a.cc:12:3: error: 'Ns' was not declared in this scope; did you mean 'N'? 12 | Ns=N; | ^~ | N
s178428291
p03775
C++
#include <bits/stdc++.h> using namespace std; int countDigit(int n) { int digit = 1; clock_t start,end; start = clock(); while((n /= 10) != 0) digit++; end = clock(); printf("countDigit() digit::%d time::%dms\n",digit,(int)(end - start)); } int main() { double N; int Ns; double rrN; int rN,A,B; cin >> N; rrN = sqrt(N); rN = rrN; Ns=N; for(int i=0;True;i++){ if(Ns%(rN-i)!=0) continue; else{ A=rN-i; break; } } B=A/N; countDigit(B); }
a.cc: In function 'int countDigit(int)': a.cc:17:1: warning: no return statement in function returning non-void [-Wreturn-type] 17 | } | ^ a.cc: In function 'int main()': a.cc:28:15: error: 'True' was not declared in this scope 28 | for(int i=0;True;i++){ | ^~~~
s324107120
p03775
C++
#include <bits/stdc++.h> using namespace std; int countDigit(int n) { int digit = 1; clock_t start,end; start = clock(); while((n /= 10) != 0) digit++; end = clock(); printf("countDigit() digit::%d time::%dms\n",digit,(int)(end - start)); } int main() { double N; double rrN; int rN,A,B; cin >> N; rrN = sqrt(N); rN = rrN; for(int i=0;True;i++){ if(N%(rN-i)!=0) continue; else{ A=rN-i; break; } } B=A/N; countDigit(B); }
a.cc: In function 'int countDigit(int)': a.cc:17:1: warning: no return statement in function returning non-void [-Wreturn-type] 17 | } | ^ a.cc: In function 'int main()': a.cc:26:15: error: 'True' was not declared in this scope 26 | for(int i=0;True;i++){ | ^~~~ a.cc:27:9: error: invalid operands of types 'double' and 'int' to binary 'operator%' 27 | if(N%(rN-i)!=0) continue; | ~^~~~~~~ | | | | | int | double
s752363001
p03775
C++
#include <iostream> #include <cmath> #include <string> #include <cstring> #include <utility> #include <vector> #include <set> #include <map> #include <stack> #include <queue> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #define debug(x) cerr << #x << ':' << x << endl #define rep(i,n) for(int i=0;i<(int)n;++i) #define ALL(c) (c).begin(), (c).end() using namespace std; typedef long long ll; int main(){ ll n; cin >> n; int mi = 1e9; for(int i=1; i*i<=n;i++){ if(n%i!=0)continue; int A=i,B=n/i; int cntA=0, cntB=0; while(A!=0) { A/=10; cntA++; } while(B!=0) { B/=10; cntB++; } mi = max(cntA, cntB); } cout << mi << endl; return 0; } #include <iostream> #include <cmath> #include <string> #include <cstring> #include <utility> #include <vector> #include <set> #include <map> #include <stack> #include <queue> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #define debug(x) cerr << #x << ':' << x << endl #define rep(i,n) for(int i=0;i<(int)n;++i) #define ALL(c) (c).begin(), (c).end() using namespace std; typedef long long ll; int main(){ ll n; cin >> n; int mi = 1e9; for(int i=1LL; i*i<=n;i++){ if(n%i!=0)continue; int A=i,B=n/i; int cntA=0, cntB=0; while(A!=0) { A/=10; cntA++; } while(B!=0) { B/=10; cntB++; } mi = max(cntA, cntB); } cout << mi << endl; return 0; }
a.cc:64:5: error: redefinition of 'int main()' 64 | int main(){ | ^~~~ a.cc:21:5: note: 'int main()' previously defined here 21 | int main(){ | ^~~~
s697572448
p03775
C++
#include<bits/stdc++.h> using namespace std; int main() { long long n,ans; cin>>n; int k=0; for(int i=sqrt(n);i>=1;i--) { if(n%i==0) { ans=n/i; break; } } while(ans>0) { ++k; ans/=10; } printf("%d\n",s); return 0; }
a.cc: In function 'int main()': a.cc:21:19: error: 's' was not declared in this scope 21 | printf("%d\n",s); | ^
s880439250
p03775
C++
#include <bits/stdc++.h> using namespace std; int main(){ long long int n; cin >> n; long long int j,k,m = 0; for(int i = 1; i <= sqrt(n); i++){ if(n%i==0){ k = n/i for(j = 1; n>=10 ;j++){ k = k/10; } if(m<k){ k = m; } } break; } cout << m << endl; }
a.cc: In function 'int main()': a.cc:10:14: error: expected ';' before 'for' 10 | k = n/i | ^ | ; 11 | for(j = 1; n>=10 ;j++){ | ~~~ a.cc:11:28: error: expected ';' before ')' token 11 | for(j = 1; n>=10 ;j++){ | ^ | ;
s854785795
p03775
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; int j; for(int i = sqrt(n); i <= n; i++){ if(n%i==0){ for(j = 0; n>=10 ;j++){ n = n/10; } } cout << j << endl; break; } } }
a.cc:18:1: error: expected declaration before '}' token 18 | } | ^
s260066397
p03775
C++
// {{{ #include <algorithm> #include <array> #include <bitset> #include <cmath> #include <cstdio> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <string> #include <tuple> #include <utility> #include <vector> // }}} using namespace std; using ll = long long; using ull = unsigned long long; using ld = long double; static constexpr int mod = (int)1e9 + 7; static constexpr int inf = 100100100; static constexpr ll linf = 1e18; static constexpr double eps = 1e-9; static constexpr double pi = 3.14159265359; #define rep(i, n) for (ll i = 0; i < n; ++i) #define rrep(i, n) for (ll i = n; i >= 0; --i) #define all(c) begin(c), end(c) #define rall(c) rbegin(c), rend(c) #define pb push_back #define ist insert #define fst first #define snd second template <typename T> vector<T> trial_division(T num) { assert(num > 1); vector<T> factor; T n = sqrt(num) + 1; for (T i = 2; i < n; ++i) { while (num % i == 0) { num /= i; factor.push_back(i); } } if (num > 1) { factor.push_back(num); } return factor; } int main() { // cin.tie(0); // ios_base::sync_with_stdio(false); ll N; cin >> N; auto D = trial_division(N); ll ans = linf; for (ll i = 0; i < (1 << D.size()); ++i) { ll A = 1; ll B = 1; for (ll j = 0; j < D.size(); ++j) { if ((1 << j) & i) { A *= D[j]; } else { B *= D[j]; } } ans = min(ans, (ll)max(to_string(A).size(), to_string(B).size())); } cout << ans << endl; }
a.cc: In instantiation of 'std::vector<_Tp> trial_division(T) [with T = long long int]': a.cc:67:28: required from here 67 | auto D = trial_division(N); | ~~~~~~~~~~~~~~^~~ a.cc:47:11: error: 'assert' was not declared in this scope 47 | assert(num > 1); | ~~~~~~^~~~~~~~~ a.cc:20:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 19 | #include <utility> +++ |+#include <cassert> 20 | #include <vector>
s977136478
p03775
C++
9998200081#include <bits/stdc++.h> using namespace std; void solve(long long N) {} // Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools (tips: You // use the default template now. You can remove this line by using your custom // template) int main() { long long N; scanf("%lld", &N); solve(N); return 0; }
a.cc:1:11: error: stray '#' in program 1 | 9998200081#include <bits/stdc++.h> | ^ a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 9998200081#include <bits/stdc++.h> | ^~~~~~~~~~ a.cc: In function 'int main()': a.cc:11:3: error: 'scanf' was not declared in this scope 11 | scanf("%lld", &N); | ^~~~~
s202484017
p03775
C++
#include<iostream> #include<algorithm> typedef long long ll; using namespace std; int main() { ll n,maxv,maxv2; int i; int digit1 = 0, digit2 = 0; cin >> n; for (i = 1; i <= sqrt(n)+1; ++i) { if (n % i == 0) { maxv = i; } } maxv2 = n/maxv; while (maxv != 0) { maxv /= 10; ++digit1; } while (maxv2 != 0) { maxv2 /= 10; ++digit2; } digit1 = max(digit1, digit2); cout << digit1 << endl; }
a.cc: In function 'int main()': a.cc:11:26: error: 'sqrt' was not declared in this scope 11 | for (i = 1; i <= sqrt(n)+1; ++i) { | ^~~~
s212608503
p03775
C++
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <iomanip> #include <queue> using namespace std; #define lol long long int main() { double N; cin >> N; int N2 = (int)(N); int n = (int)(sqrt(N)); vector<int> AB(4); AB[2] = 1; AB[3] = N2; for (int i = n; i < N2; i++) { if (N2 % i == 0) { AB[0] = i; AB[1] = n * 2 - i; } } vector<int> A(4); for (int i = 0; i < 4; i++) { while (AB[i] != 0) { AB[i] /= 10; A[i]++; } } int ans = min(max(A[0],A[1]),max(A[2],A[3])); cout << ans << endl; }
a.cc: In function 'int main()': a.cc:16:23: error: 'sqrt' was not declared in this scope 16 | int n = (int)(sqrt(N)); | ^~~~
s460459976
p03775
C++
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <iomanip> #include <queue> using namespace std; #define lol long long int main() { int N; cin >> N; int n = (int)(sqrt(N)); vector<int> AB(4); AB[2] = 1; AB[3] = N; for (int i = n; i < N; i++) { if (N % i == 0) { AB[0] = i; AB[1] = n * 2 - i; } } vector<int> A(4); for (int i = 0; i < 4; i++) { while (AB[i] != 0) { AB[i] /= 10; A[i]++; } } int ans = min(A[0] + A[1], A[2] + A[3]); cout << ans << endl; }
a.cc: In function 'int main()': a.cc:15:23: error: 'sqrt' was not declared in this scope 15 | int n = (int)(sqrt(N)); | ^~~~
s508413421
p03775
C++
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> using namespace std; #define LL long long #define R register LL n,ans,s; int main() { scanf("%lld",&n);。 for(int i=sqrt(n);i>2;--i)if(n%i==0){ans=n/i;break;} while(ans>0){++s;ans/=10;} cout<<s<<endl; return 0; }
a.cc:12:22: error: extended character 。 is not valid in an identifier 12 | scanf("%lld",&n);。 | ^ a.cc: In function 'int main()': a.cc:12:22: error: '\U00003002' was not declared in this scope 12 | scanf("%lld",&n);。 | ^~ a.cc:13:23: error: 'i' was not declared in this scope 13 | for(int i=sqrt(n);i>2;--i)if(n%i==0){ans=n/i;break;} | ^
s110878398
p03775
C++
int main(){ long long n; cin>>n; int d=1; for(int i=1;i<=sqrt(n);i++){ if(n%i==0){ d=i; } } int t=n/d; int ans=0; while(t>0){ ans++; t /= 10; } cout<<ans<<endl; return 0; }
a.cc: In function 'int main()': a.cc:3:3: error: 'cin' was not declared in this scope 3 | cin>>n; | ^~~ a.cc:5:18: error: 'sqrt' was not declared in this scope 5 | for(int i=1;i<=sqrt(n);i++){ | ^~~~ a.cc:16:3: error: 'cout' was not declared in this scope 16 | cout<<ans<<endl; | ^~~~ a.cc:16:14: error: 'endl' was not declared in this scope 16 | cout<<ans<<endl; | ^~~~
s251099674
p03775
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ long long n; long long temp; int ans = 0; cin>>n; for(int i=1;i<=sqrt(n);i++) if(n%i==0)temp = i; temp = n / temp; while(temp>0){ temp /= 10; ans++; } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:12:24: error: 'sqrt' was not declared in this scope 12 | for(int i=1;i<=sqrt(n);i++) | ^~~~
s361287306
p03775
C++
#include<iostream> using namespace std; int main(){ long long n; long long temp; int ans = 0; cin>>n; for(int i=1;i<sqrt(n);i++) if(n%i==0)temp = i; temp = n / temp; while(temp>0){ temp /= 10; ans++; } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:11:23: error: 'sqrt' was not declared in this scope 11 | for(int i=1;i<sqrt(n);i++) | ^~~~
s840318490
p03775
C++
#include<iostream> using namespace std; int main(){ long long n; long long temp; int ans = 0; cin>>n; for(int i=1;i<sqrt(n);i++) if(n%i==0)temp = i; temp = n / temp; while(temp>0){ temp /= 10; ans++; } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:11:23: error: 'sqrt' was not declared in this scope 11 | for(int i=1;i<sqrt(n);i++) | ^~~~
s537896445
p03775
C++
#include <bits/stdc++.h> using namespace std; int getdigit(long long N) { int digit = 0; while(N>0) { digit++; N /= 10; } return digit; } int main() { long long N; cin >> N; int mindigit; for (int i = sqrt(N)+1; i > 0; i--) { if(N % i == 0) { mindigit = max(getdigit(i), getdigit(N / i)); cout << mindigit; return 0; } }
a.cc: In function 'int main()': a.cc:22:2: error: expected '}' at end of input 22 | } | ^ a.cc:13:12: note: to match this '{' 13 | int main() { | ^
s759614918
p03775
C++
#include <bits/stdc++.h> using namespace std; int getdigit(long long N) { int digit = 0; while(N>0) { digit++; N /= 10; } return digit; } int main() { long long N; cin >> N; int mindigit = 11; for (int i = sqrt(N)+1; i > 0; i--) { if(N % i == 0) { mindigit = min(mindigit, max(getdigit(i), getdigit(N / i))); cout << mindigit; return 0 } }
a.cc: In function 'int main()': a.cc:20:15: error: expected ';' before '}' token 20 | return 0 | ^ | ; 21 | } | ~ a.cc:22:2: error: expected '}' at end of input 22 | } | ^ a.cc:13:12: note: to match this '{' 13 | int main() { | ^
s876952745
p03775
C++
#include <bits/stdc++.h> using namespace std; int getdigit(int N) { int digit = 0; while(N>0) { digit++; N /= 10; } return digit; } int main() { long long N = scanf("lld" N); int mindigit = 11; for (int i = 1; i <= sqrt(N); i++) mindigit = min(mindigit, getdigit(i) + getdigit(N - i)) cout << mindigit; }
a.cc: In function 'int main()': a.cc:14:28: error: expected ')' before 'N' 14 | long long N = scanf("lld" N); | ~ ^~ | ) a.cc:16:93: error: expected ';' before 'cout' 16 | for (int i = 1; i <= sqrt(N); i++) mindigit = min(mindigit, getdigit(i) + getdigit(N - i)) | ^ | ; 17 | cout << mindigit; | ~~~~
s155632193
p03775
C++
#include <bits/stdc++.h> using namespace std; int getdigit(int N) { int digit = 0 while(N>0) { digit++; N /= 10; } return digit; } int main() { long long N = scanf("lld", N); int mindigit = 11; for (int i = 1; i <= sqrt(N); i++) mindigit = min(mindigit, getdigit(i) + getdigit(N - i)) cout << mindigit; }
a.cc: In function 'int getdigit(int)': a.cc:6:3: error: expected ',' or ';' before 'while' 6 | while(N>0) { | ^~~~~ a.cc: In function 'int main()': a.cc:16:93: error: expected ';' before 'cout' 16 | for (int i = 1; i <= sqrt(N); i++) mindigit = min(mindigit, getdigit(i) + getdigit(N - i)) | ^ | ; 17 | cout << mindigit; | ~~~~
s823935567
p03775
C++
#include <stdio.h> #include <string> #include <algorithm> #include <map> #include <iostream> using namespace std; int main() { int N, ans = 0, B; cin >> N; for (int i = 1; i <= sqrt(N); i++) { if ((double)N/(double)(i*i)==(double)(N/(i*i)))B = N/i; } cout << B << endl; while (1){ ans++; B = B / 10; if (B == 0)break; } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:11:30: error: 'sqrt' was not declared in this scope 11 | for (int i = 1; i <= sqrt(N); i++) { | ^~~~
s488235721
p03775
C++
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; int a,min=0; for(long long i=1; i*i<n; i++) { if(n%i==0) { a=n/i; while(a>0) { cnt++; a/=10; } } } cout << min << endl; }
a.cc: In function 'int main()': a.cc:12:9: error: 'cnt' was not declared in this scope; did you mean 'int'? 12 | cnt++; | ^~~ | int
s736200530
p03775
C++
#include"bits/stdc++.h" using namespace std; int f,a,b,n; int min(int i,int j){ return i<j; } int main(){ cin>>a>>>b; int c=strelen(a); int d=strlen(b); f=min(c,d); n=a*b; cout<<n; return 0; }//给你一个整数n 求F ( A,B )的最小值为,使得N = A×B
a.cc: In function 'int main()': a.cc:10:17: error: expected primary-expression before '>' token 10 | cin>>a>>>b; | ^ a.cc:11:15: error: 'strelen' was not declared in this scope; did you mean 'strnlen'? 11 | int c=strelen(a); int d=strlen(b); | ^~~~~~~ | strnlen a.cc:11:40: error: invalid conversion from 'int' to 'const char*' [-fpermissive] 11 | int c=strelen(a); int d=strlen(b); | ^ | | | int In file included from /usr/include/c++/14/cstring:43, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121, from a.cc:1: /usr/include/string.h:407:35: note: initializing argument 1 of 'size_t strlen(const char*)' 407 | extern size_t strlen (const char *__s) | ~~~~~~~~~~~~^~~
s897430212
p03775
C++
#include"bits/stdc++.h" using namespace std; int f,a,b,n; int max(int i,int j){ return i>j; } int main(){ cin>>a>>>b; int c=strelen(a); int d=strlen(b); f=min(c,d); n=a*b; cout<<n; return 0; }//给你一个整数n 求F ( A,B )的最小值为,使得N = A×B
a.cc: In function 'int main()': a.cc:10:17: error: expected primary-expression before '>' token 10 | cin>>a>>>b; | ^ a.cc:11:15: error: 'strelen' was not declared in this scope; did you mean 'strnlen'? 11 | int c=strelen(a); int d=strlen(b); | ^~~~~~~ | strnlen a.cc:11:40: error: invalid conversion from 'int' to 'const char*' [-fpermissive] 11 | int c=strelen(a); int d=strlen(b); | ^ | | | int In file included from /usr/include/c++/14/cstring:43, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121, from a.cc:1: /usr/include/string.h:407:35: note: initializing argument 1 of 'size_t strlen(const char*)' 407 | extern size_t strlen (const char *__s) | ~~~~~~~~~~~~^~~
s074709009
p03775
C++
var lines = []; var readline = require('readline'); var C = [].fill(0); var result = Infinity; var rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); rl.on('line', function (x) { lines.push(x); }) rl.on('close', function () { var N = Number(lines.shift()); var n = N; var counter = [].fill(0); for (var i = 2; i < Math.sqrt(N); i++) { if (counter[i] === undefined && n % i === 0) { counter[i] = 0; } while (n % i === 0) { n = n / i; counter[i]++; } } if (counter.length === 0) console.log(N.toString().length); else { counter.forEach(function (value, index, array) { for (var i = 0; i < value; i++) { C.push(index); } }); if (n !== 1) C.push(n); dfs(0, []); console.log(result); } }); function dfs(n, comb) { if (n === C.length) { calc(comb); return (0); } comb[n] = 0; dfs(n + 1, comb); comb[n] = 1; dfs(n + 1, comb); } function calc(comb) { var a = 1; var b = 1; for (var i = 0; i < comb.length; i++) { if (comb[i] === 0) { a *= C[i]; } else { b *= C[i]; } } if (result > b.toString().length && a.toString().length <= b.toString().length) { result = b.toString().length; } }
a.cc:3:24: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 3 | var readline = require('readline'); | ^~~~~~~~~~ a.cc:12:7: warning: multi-character character constant [-Wmultichar] 12 | rl.on('line', function (x) { | ^~~~~~ a.cc:16:7: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 16 | rl.on('close', function () { | ^~~~~~~ a.cc:2:1: error: 'var' does not name a type 2 | var lines = []; | ^~~ a.cc:3:1: error: 'var' does not name a type 3 | var readline = require('readline'); | ^~~ a.cc:4:1: error: 'var' does not name a type 4 | var C = [].fill(0); | ^~~ a.cc:5:1: error: 'var' does not name a type 5 | var result = Infinity; | ^~~ a.cc:7:1: error: 'var' does not name a type 7 | var rl = readline.createInterface({ | ^~~ a.cc:10:2: error: expected unqualified-id before ')' token 10 | }); | ^ a.cc:12:1: error: 'rl' does not name a type 12 | rl.on('line', function (x) { | ^~ a.cc:14:2: error: expected unqualified-id before ')' token 14 | }) | ^ a.cc:40:2: error: expected unqualified-id before ')' token 40 | }); | ^ a.cc:42:1: error: 'function' does not name a type; did you mean 'union'? 42 | function dfs(n, comb) { | ^~~~~~~~ | union a.cc:52:1: error: 'function' does not name a type; did you mean 'union'? 52 | function calc(comb) { | ^~~~~~~~ | union
s079876931
p03775
C++
#include<iostream> #include <string> #include<algorithm> using namespace std; int main() { long long N; cin >> N; long long A, B; for (int i = sqrt(N); i >= 1; i--) { if (N%i == 0) { A = i * 1LL; B = N / i; break; } } string a = to_string(A), b = to_string(B); cout << max(a.size(), b.size()) << endl; }
a.cc: In function 'int main()': a.cc:11:22: error: 'sqrt' was not declared in this scope 11 | for (int i = sqrt(N); i >= 1; i--) { | ^~~~
s893122380
p03775
C++
#include<iostream> using namespace std; int main() { long N; cin >> N; int i = 1; for (;i * i <= N;++ i) if (N % i == 0) a = i; i = N / i; int ans = 1; while(i /= 10) ++ ans; cout << ans; }
a.cc: In function 'int main()': a.cc:7:42: error: 'a' was not declared in this scope 7 | for (;i * i <= N;++ i) if (N % i == 0) a = i; | ^
s064918543
p03775
C++
#include <iostream> #include <algorithm> using namespace std; long n;int ans = 0; int main() { cin >> n; for (int i = 1; i <= sqrt(n); i++) { if (n%i == 0)ans = log10(n / i) + 1; } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:7:30: error: 'sqrt' was not declared in this scope 7 | for (int i = 1; i <= sqrt(n); i++) { | ^~~~ a.cc:8:36: error: 'log10' was not declared in this scope 8 | if (n%i == 0)ans = log10(n / i) + 1; | ^~~~~
s674482577
p03775
C++
#include <iostream> #include <algorithm> using namespace std; long n; int ans = 0; int main() { cin >> n; for (int i = 1; i <= powl(10,log10(n)/2); i++) { if (n%i == 0) { ans = log10(n/i)+1; } } cout<< powl(10, log10(n) / 2) << endl; cout << log10(n) << endl; cout << ans << endl; }
a.cc: In function 'int main()': a.cc:8:38: error: 'log10' was not declared in this scope 8 | for (int i = 1; i <= powl(10,log10(n)/2); i++) { | ^~~~~ a.cc:8:30: error: 'powl' was not declared in this scope 8 | for (int i = 1; i <= powl(10,log10(n)/2); i++) { | ^~~~ a.cc:13:25: error: 'log10' was not declared in this scope 13 | cout<< powl(10, log10(n) / 2) << endl; | ^~~~~ a.cc:13:16: error: 'powl' was not declared in this scope 13 | cout<< powl(10, log10(n) / 2) << endl; | ^~~~
s042727179
p03775
C++
#include <bits/stdc++.h> using namespace std; int function(long long int n,int keta){ int mi=keta; for(long long int i=1;i*i<=n;i++){ if(n%i==0){ long long int k=n/i; int ketak=0; while(k){ k/=10; ketak++; } mi=min(mi,ketak); } } return mi; } int main(){ long long int n;cin>>n; int keta=0; { long long int k=n; while(k){ k/=10; keta++; } } cout<<function(n,keta)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:36:9: error: reference to 'function' is ambiguous 36 | cout<<function(n,keta)<<endl; | ^~~~~~~~ In file included from /usr/include/c++/14/functional:59, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53, from a.cc:1: /usr/include/c++/14/bits/std_function.h:111:11: note: candidates are: 'template<class _Signature> class std::function' 111 | class function; | ^~~~~~~~ a.cc:4:5: note: 'int function(long long int, int)' 4 | int function(long long int n,int keta){ | ^~~~~~~~
s824449474
p03775
C++
#include<bits/stdc++.h> using namespace std; string toString(const T& s) { ostringstream os; os << s; return os.str(); } int main() { string b; int n; cin>>n; for(int i=floor(sqrt(n));i>=1;i--) { if(n%i==0) { b=toString(n%i); cout<<b.length()<<endl; break; } } }
a.cc:3:23: error: 'T' does not name a type 3 | string toString(const T& s) { | ^
s540726972
p03775
C++
#include<bits/stdc++.h> using namespace std; int main() { string b; int n; cin>>n; for(int i=floor(sqrt(n));i>=1;i--) { if(n%i==0) { b=toString(n%i); cout<<b.length()<<endl; break; } } }
a.cc: In function 'int main()': a.cc:12:27: error: 'toString' was not declared in this scope 12 | b=toString(n%i); | ^~~~~~~~
s886178141
p03775
C++
#include<iostream> #include<cmath> using namespace std; int digits(long long n) { int r = 0; while(n > 0) { n /= 10; r++; } return r; } int func(long long a,long long b) { return max(digits(a),digits(b)); } int main() { long long N; int ans = 100; cin >> N; for(long long i=1;i*i=<N;i++) { if(N%i==0) { ans = min(func(i,N/i),ans); } } cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:32:31: error: expected primary-expression before '<' token 32 | for(long long i=1;i*i=<N;i++) | ^
s601713617
p03775
C++
#include<bits/stdc++.h> using namespace std; int main() { long long int n,i,t,s; cin>>n; for(i=sqrt(n);i>=1;i--) { if(n%i==0) { t=i,l=n/i; s=1; while(l>=10) { s++; l/=10; } cout<<s; return 0; } } }
a.cc: In function 'int main()': a.cc:11:17: error: 'l' was not declared in this scope 11 | t=i,l=n/i; | ^
s808800628
p03775
C++
#include<bits/stdc++.h> using namespace std; using ll = long long; #define MM 1000000000 #define mod MM+7 #define INF (ll)1e18 #define PI acos(-1.0) #define NIL -1 int dx[4] = {0, 1, 0, -1}; int dy[4] = {1, 0, -1, 0}; int digit(ll m){ if(1 <= m && m < 10) return 1; else if(10 <= m && m < 100) return 2; else if(100 <= m && m < 1000) return 3; else if(1000 <= m && m < 10000) return 4; else if(10000 <= m && m < 100000) return 5; else if(100000 <= m && m < 1000000) return 6; else if(1000000 <= m && m < 10000000) return 7; else if(10000000 <= m && m < 100000000) return 8; else if(100000000 <= m && m < 1000000000) return 9; else return 10; } int main(){ ll n; cin >> n; ll mn = 1000000000; for(ll i = 1; i <= n/2; i++){ if(n%i == 0){ mn = min(mn, digit(i)*digit(n/i)); } } cout << mn << endl; }
a.cc: In function 'int main()': a.cc:28:21: error: no matching function for call to 'min(ll&, int)' 28 | mn = min(mn, digit(i)*digit(n/i)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)' 233 | min(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:233:5: note: template argument deduction/substitution failed: a.cc:28:21: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int') 28 | mn = min(mn, digit(i)*digit(n/i)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)' 281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate expects 3 arguments, 2 provided In file included from /usr/include/c++/14/algorithm:61: /usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)' 5686 | min(initializer_list<_Tp> __l) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate expects 1 argument, 2 provided /usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)' 5696 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5696:5: note: template argument deduction/substitution failed: a.cc:28:21: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int' 28 | mn = min(mn, digit(i)*digit(n/i)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~
s892129837
p03775
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,N) for(int i=0;i<int(N);++i) #define rep1(i,N) for(int i=1;i<int(N);++i) int cnt_digits(ll X){ int cnt=0; while(X>0){ X/=10; cnt++; } return cnt; } int main() { ll N; cin>>N; int ans=cnt_digits(N); rep1(A,1e5+1){ if(N%A==0){ ll B=N/A; int C=max(cnt_digits(A),cnt_digits(B)); ans=min(ans,C); } } cout<<ans<<endl; }
a.cc:6:16: error: 'll' was not declared in this scope 6 | int cnt_digits(ll X){ | ^~ a.cc: In function 'int main()': a.cc:16:9: error: 'll' was not declared in this scope 16 | ll N; | ^~ a.cc:17:14: error: 'N' was not declared in this scope 17 | cin>>N; | ^ a.cc:18:27: error: 'cnt_digits' cannot be used as a function 18 | int ans=cnt_digits(N); | ~~~~~~~~~~^~~ a.cc:21:27: error: expected ';' before 'B' 21 | ll B=N/A; | ^~ | ; a.cc:22:45: error: 'cnt_digits' cannot be used as a function 22 | int C=max(cnt_digits(A),cnt_digits(B)); | ~~~~~~~~~~^~~ a.cc:22:60: error: 'B' was not declared in this scope 22 | int C=max(cnt_digits(A),cnt_digits(B)); | ^ a.cc:22:61: error: 'cnt_digits' cannot be used as a function 22 | int C=max(cnt_digits(A),cnt_digits(B)); | ^
s145336569
p03775
C++
#include <iostream> #include <math.h> using namespace std; int f(long long a, long long b){ int numa = 0; int numb = 0; while(a > 0){ numa++; a /= 10; } while(b > 0){ numb++; b /= 10; } if(numa > numb) return numa; else return numb; } int main(void){ long n; cin >> n; int ans = INT_MAX; int temp; for(long long i = 1; i <= sqrt(n); i++){ if(n % i == 0) temp = f(i, n / i); if(temp < ans) ans = temp; } cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:23:13: error: 'INT_MAX' was not declared in this scope 23 | int ans = INT_MAX; | ^~~~~~~ a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 2 | #include <math.h> +++ |+#include <climits> 3 | using namespace std;
s931831629
p03775
C++
#include<cmath> using namespace std; long long n,ans; int s; int main(){ scanf("%lld",&n); for(int i=sqrt(n);i>0;--i) if(n%i==0){ ans=n/i; break; } while(ans>0){ ++s; ans/=10; } printf("%d\n",s); return 0; }
a.cc: In function 'int main()': a.cc:6:5: error: 'scanf' was not declared in this scope 6 | scanf("%lld",&n); | ^~~~~ a.cc:16:5: error: 'printf' was not declared in this scope 16 | printf("%d\n",s); | ^~~~~~ a.cc:2:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' 1 | #include<cmath> +++ |+#include <cstdio> 2 | using namespace std;
s671166626
p03775
C++
#include<cstdio> #include<cmath> using namespace std; long long n,ans; int s; int main(){ scanf("%lld",&n);。 for(int i=sqrt(n);i>0;--i) if(n%i==0){ ans=n/i; break; } while(ans>0){ ++s; ans/=10; } printf("%d\n",s); return 0; }
a.cc:7:22: error: extended character 。 is not valid in an identifier 7 | scanf("%lld",&n);。 | ^ a.cc: In function 'int main()': a.cc:7:22: error: '\U00003002' was not declared in this scope 7 | scanf("%lld",&n);。 | ^~ a.cc:8:23: error: 'i' was not declared in this scope 8 | for(int i=sqrt(n);i>0;--i) | ^
s941667617
p03775
C++
#include <bits/stdc++.h> #include <windows.h> using namespace std; void Set_char(char k) { if (k>='a' && k<='z') { k=k-32; keybd_event(k,0,0,0); keybd_event(k,0,KEYEVENTF_KEYUP,0); } else if (k>='A' && k<='Z') { keybd_event(20,0,0,0); k=k-'A'+65; keybd_event(20,0,0,0); keybd_event(k,0,0,0); keybd_event(20,0,KEYEVENTF_KEYUP,0); } else { keybd_event(k,0,0,0); keybd_event(k,0,KEYEVENTF_KEYUP,0); } } void Set_string(string s) { for(int i=0; i<s.length(); i++) { if (s[i]=='-') { keybd_event(109,0,0,0); keybd_event(109,0,KEYEVENTF_KEYUP,0); } Set_char(s[i]); Sleep(100); } } void Click(int x,int y) { SetCursorPos(x,y); mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0); mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0); Sleep(1000); } string s1="www"; string s2="luogu"; string s3="org"; string s4="kkksc"; string s5="03" ; main() { Click(288,744); Click(189,64); Set_string(s1); keybd_event(190,0,0,0); Set_string(s2); keybd_event(190,0,0,0); Set_string(s3); keybd_event(13,0,0,0); keybd_event(13,0,0,0); Sleep(6000); Click(1175,119); Sleep(3000); Click(1037,620); Sleep(1000); Click(159,217); Set_string(s4); keybd_event(13,0,0,0); Set_string(s5); keybd_event(13,0,0,0); Click(385,221); }
a.cc:2:10: fatal error: windows.h: No such file or directory 2 | #include <windows.h> | ^~~~~~~~~~~ compilation terminated.
s928163863
p03775
C++
#include<bits/stdc++.h> using namespace std; int main() { POINT p; Sleep(2000); GetCursorPos(&p); cout<<p.x<<" "<<p.y<<endl; SetCursorPos(279,886); Sleep(100); mouse_event(MOUSEEVENTF_LEFTDOWN,279,886,0,0); Sleep(100); mouse_event(MOUSEEVENTF_LEFTUP,279,886,0,0); Sleep(100); SetCursorPos(263,46); Sleep(100); mouse_event(MOUSEEVENTF_LEFTDOWN,263,46,0,0); Sleep(100); mouse_event(MOUSEEVENTF_LEFTUP,263,46,0,0); string s1="WWW>LUOGU>ORG"; for(int i=0;i<13;i++) { keybd_event(0x2E,0,0,0); Sleep(100); keybd_event(0x2E,0,KEYEVENTF_KEYUP,0); Sleep(100); } return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'POINT' was not declared in this scope 6 | POINT p; | ^~~~~ a.cc:7:9: error: 'Sleep' was not declared in this scope; did you mean 'sleep'? 7 | Sleep(2000); | ^~~~~ | sleep a.cc:8:23: error: 'p' was not declared in this scope 8 | GetCursorPos(&p); | ^ a.cc:8:9: error: 'GetCursorPos' was not declared in this scope 8 | GetCursorPos(&p); | ^~~~~~~~~~~~ a.cc:10:9: error: 'SetCursorPos' was not declared in this scope 10 | SetCursorPos(279,886); | ^~~~~~~~~~~~ a.cc:12:21: error: 'MOUSEEVENTF_LEFTDOWN' was not declared in this scope 12 | mouse_event(MOUSEEVENTF_LEFTDOWN,279,886,0,0); | ^~~~~~~~~~~~~~~~~~~~ a.cc:12:9: error: 'mouse_event' was not declared in this scope 12 | mouse_event(MOUSEEVENTF_LEFTDOWN,279,886,0,0); | ^~~~~~~~~~~ a.cc:14:21: error: 'MOUSEEVENTF_LEFTUP' was not declared in this scope 14 | mouse_event(MOUSEEVENTF_LEFTUP,279,886,0,0); | ^~~~~~~~~~~~~~~~~~ a.cc:24:17: error: 'keybd_event' was not declared in this scope 24 | keybd_event(0x2E,0,0,0); | ^~~~~~~~~~~ a.cc:26:28: error: 'KEYEVENTF_KEYUP' was not declared in this scope 26 | keybd_event(0x2E,0,KEYEVENTF_KEYUP,0); | ^~~~~~~~~~~~~~~
s087961680
p03775
C++
// #include <bits/stdc++.h> #include <map> #include <set> #include <ctime> #include <cstring> #include <queue> #include <iostream> #include <algorithm> using namespace std; #define mod 1000000007 #define INF 1000000000 #define mp make_pair #define pb push_back #define mt make_tuple #define eb emplace_back #define all(x) begin(x), end(x) #define len(x) ((int)(x).size()) #define contains(a, x) (a.find(x) != end(a)) #define rep(i, n) for (int i = 0; i < (int)n; ++i) #define F(i,a,b) for(int i = (int)(a); i < (int)(b); ++i) #define RF(i,a,b)for(int i = (int)(a); i >= (int)(b); --i) using dbl = double; using ll = long long; using ull = unsigned long long; using vi = vector<int>; using vvi = vector<vi>; using vvl = vector<long long>; using pi = pair<int,int>; #define fast() {ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);} // #define log(x) cout << x << endl; int dc(int a,int b) { int c = 0, d = 0; while (a) c+=1, a/=10; while (b) d+=1, b/=10; return max(c,d); } // int dc2(int a, int b) { // dbl c = log(a)/log(10); // dbl d = log(b)/log(10); // return max(c+1,d+1); // } int main() { srand(time(NULL)); ll n,a,b,mn=INF; cin >> n; for (int i=1; i<=sqrt(n); ++i) { a = i, b = n/i; if (a*b!=n) continue; mn = min<ll>(mn, dc(a, b)); } cout << mn; return 0; }
a.cc: In function 'int main()': a.cc:57:26: error: 'sqrt' was not declared in this scope 57 | for (int i=1; i<=sqrt(n); ++i) { | ^~~~
s581701990
p03775
C++
#include<iostream> using namespace std; int main(){ long N; cin >> N; long dive; for (long i = 1; i < N; i++){ if(N % i == 0){ dive = N / i; // cout << dive << endl; if (dive <= i) break; } } int copy = dive; int count = 0; while(1){ copy = copy / 10; count++; if (copy == 0) break; } cout << count << endl;*/ }
a.cc: In function 'int main()': a.cc:24:28: error: expected primary-expression before '/' token 24 | cout << count << endl;*/ | ^ a.cc:25:1: error: expected primary-expression before '}' token 25 | } | ^
s514362602
p03775
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> p; const int inf=(1<<30); #define rep(i,a,n) for(int i=a;i<n;i++) #define rrep(i,a,n) for(int i=(a-1);i>=n;i--) ll cnt_digit(ll a){ ll x=0; while(a>0){ a/=10; x++; } return x; } int main(){ ll x; cin>>x; ll ans=x; for(ll i=1;i*i<=x;i++){ if(x%i!=0)continue; ll b=x/i; ll y=max(cnt_digit(a),cnt_digit(b)); ans=min(ans,y); } cout<<ans<<endl; }
a.cc: In function 'int main()': a.cc:25:36: error: 'a' was not declared in this scope 25 | ll y=max(cnt_digit(a),cnt_digit(b)); | ^
s410170192
p03775
C++
//#include <bits/stdc++.h> //#include <stdio.h> #include<iostream> #include<cstdio> #include<bitset> #include<algorithm> #include<vector> #include<list> #include<queue> #include<stack> #include <bits/stdc++.h> #include<string> #include<string.h> #include<cmath> #include<utility> #include<functional> #include<map> #include<set> #include<cctype> #include<fstream> #include <numeric> #include <iomanip> #include <cstring> using namespace std; using ll=long long; #define FOR(i, a, b) for( int i=(a);i<=(b);i++) #define RFOR(i, a, b) for( int i=(a);i>=(b);i--) #define LFOR(i, a, b) for( long long int i=(a);i<=(b);i++) #define LRFOR(i, a, b) for(long long int i=(a);i>=(b);i--) #define MOD 1000000007 #include <iostream> #include <cmath> using namespace std; bool isPrimeNum( ll x ){ // 素数である場合 true を返す if( x <= 1 ){ // 1以下である場合は素数でないことがすぐにわかる return false; } // sqrt( double型 ) は引数の平方根を double型で返すので、int型でキャスト int n = (int)sqrt( (double)x ); for( int i = 2; i <= n; i++ ){ if( x % i == 0 ){ // 割り切る整数がある場合、即判定終了 return false; } } return true; // 割り切る整数がない場合、素数である } constexpr ll gcd(ll a,ll b){return b?gcd(b,a%b):a;} constexpr ll lcm(int a,int b){return a*b/gcd(a,b);} constexpr ll abs(ll a,ll b){ if(a>=b)return a-b; if(a<b)return b-a; } int dx[4]={1,0,-1,0}; int dy[4]={0,1,0,-1}; int main() { ll N; cin>> N >>endl; int ans=0; FOR(i,1,10000){ if(N%i==0){ int tmp; if(i >= N/i){ tmp=i; }else{ tmp=N/i; } int count=0; while(tmp>0){ count++; tmp=tmp/10; } if(count>ans){ans=count;} } } cout<<ans<<endl; return 0; }
a.cc: In function 'int main()': a.cc:67:13: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and '<unresolved overloaded function type>') 67 | cin>> N >>endl; | ~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/iostream:42, from a.cc:3: /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 | operator>>(__streambuf_type* __sb); | ~~
s170389017
p03775
C++
import math N = int(input()) ans = [] for i in range(1,round(math.sqrt(N))): if N%i == 0: ans.append(len(str(N//i))) print(min(ans))
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'
s030194739
p03775
C++
#include <bits/stdc++.h> using namespace std; int main() { ll N; cin >> N; int m=0; for(int i=1;i++;i<=sqrt(N)){ if(N%i==0)m=i; } int r=N/m; int res=1; while (r>=10){ r/=10; res++; } cout <<res <<endl; }
a.cc: In function 'int main()': a.cc:5:4: error: 'll' was not declared in this scope 5 | ll N; | ^~ a.cc:6:11: error: 'N' was not declared in this scope 6 | cin >> N; | ^
s522786255
p03775
C++
#include <bits/stdc++.h> using namespace std; int main() { ll N; cin >> N; int m=0; for(int i=0;i++;i<=sqrt(N)){ if(N%i==0)m=i; } int r=N/m; int res=1; while (r>=10){ r/=10; res++; } cout <<res <<endl; }
a.cc: In function 'int main()': a.cc:5:4: error: 'll' was not declared in this scope 5 | ll N; | ^~ a.cc:6:11: error: 'N' was not declared in this scope 6 | cin >> N; | ^
s648831797
p03775
Java
import java.util.Scanner; import static java.lang.Math.*; class Main { public static void main(String[]$) { long N = new Scanner(System.in).nextInt(); for (long i = 1; i*i <= N; ++i) { if(N % i == 0) { ans = min(ans, max($(i), $(N/i))); } } System.out.println(ans); } static int $(long n) { int cnt = 0; while(n > 0) { n /= 10; ++cnt; } return cnt; } }
Main.java:10: error: cannot find symbol ans = min(ans, max($(i), $(N/i))); ^ symbol: variable ans location: class Main Main.java:10: error: cannot find symbol ans = min(ans, max($(i), $(N/i))); ^ symbol: variable ans location: class Main Main.java:13: error: cannot find symbol System.out.println(ans); ^ symbol: variable ans location: class Main 3 errors
s041765219
p03775
C++
#include <iostream> #include <algorithm> #include <cmath> using namespace std; int calcDigit(int); int calcMaxDigit(int, int); int main(void){ int N; cin >> N; int a=1; int b; int min_digit=INT32_MAX; for(; a<=static_cast<int>(sqrt(N)); a++){ if(N%a != 0){ continue; } b = N/a; int digit = calcMaxDigit(a, b); if(digit < min_digit){ min_digit = digit; } } cout << min_digit; return 0; } int calcDigit(int a){ int i=1; while(1){ if(a < pow(10, i)){ return i; } i++; } }
a.cc: In function 'int main()': a.cc:14:19: error: 'INT32_MAX' was not declared in this scope 14 | int min_digit=INT32_MAX; | ^~~~~~~~~ a.cc:4:1: note: 'INT32_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' 3 | #include <cmath> +++ |+#include <cstdint> 4 | using namespace std;
s147427161
p03775
C++
#include<cstdio> #include<cmath> using namespace std; long long n,ans; 。 int s; int main(){ scanf("%lld",&n); for(int i=sqrt(n);i>0;--i) if(n%i==0){ ans=n/i; break; } while(ans>0){ ++s; ans/=10; } printf("%d\n",s); return 0; }
a.cc:4:18: error: extended character 。 is not valid in an identifier 4 | long long n,ans; 。 | ^ a.cc:4:18: error: '\U00003002' does not name a type 4 | long long n,ans; 。 | ^~ a.cc: In function 'int main()': a.cc:14:11: error: 's' was not declared in this scope 14 | ++s; | ^ a.cc:17:19: error: 's' was not declared in this scope 17 | printf("%d\n",s); | ^
s228519133
p03775
C++
j#include <bits/stdc++.h> #define INF 100100100 #define MOD 1000000007 using namespace std; using ll = long long; using ull = unsigned long long ; #define FOR(i,n) for(ll i=0;i<n;i++) ull log_10(ull N){ ull count = 1; double N_ = N; while(N_>=10){ N_/=10; count++; } return count; } vector<ull> prime; int main(int argc, char const* argv[]){ ios::sync_with_stdio(false); cin.tie(0); ull N; cin >> N; for(ull i=1;i*i<=N+1;i++){ if(N%i==0)prime.push_back(i); } ull MIN = log_10(N); for(ull i=0;i<prime.size();i++){ MIN = min(max(log_10(prime[i]),log_10(N/prime[i])),MIN); } cout << MIN << endl; return 0; }
a.cc:1:2: error: stray '#' in program 1 | j#include <bits/stdc++.h> | ^ a.cc:1:1: error: 'j' does not name a type 1 | j#include <bits/stdc++.h> | ^ a.cc:22:1: error: 'vector' does not name a type 22 | vector<ull> prime; | ^~~~~~ a.cc: In function 'int main(int, const char**)': a.cc:25:4: error: 'ios' has not been declared 25 | ios::sync_with_stdio(false); | ^~~ a.cc:26:4: error: 'cin' was not declared in this scope 26 | cin.tie(0); | ^~~ a.cc:32:17: error: 'prime' was not declared in this scope 32 | if(N%i==0)prime.push_back(i); | ^~~~~ a.cc:36:18: error: 'prime' was not declared in this scope 36 | for(ull i=0;i<prime.size();i++){ | ^~~~~ a.cc:37:17: error: 'max' was not declared in this scope 37 | MIN = min(max(log_10(prime[i]),log_10(N/prime[i])),MIN); | ^~~ a.cc:37:13: error: 'min' was not declared in this scope; did you mean 'main'? 37 | MIN = min(max(log_10(prime[i]),log_10(N/prime[i])),MIN); | ^~~ | main a.cc:40:4: error: 'cout' was not declared in this scope 40 | cout << MIN << endl; | ^~~~ a.cc:40:19: error: 'endl' was not declared in this scope 40 | cout << MIN << endl; | ^~~~
s321052037
p03775
C++
#include<bits/stdc++.h> using namespace std; int calc(long long v) { int k = 1; while (v >= 10) { v /= 10; k++; } return k; } int main() { ios::sync_with_stdio(false); cin.tie(0); long long n; cin >> n; int ans = 1e9; for (long long i = 0; i*i <= n; i++) { if (n%i == 0) { long long v = n / i; ans = min(ans, max(calc(i), calc(v)); } } cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:22:61: error: expected ')' before ';' token 22 | ans = min(ans, max(calc(i), calc(v)); | ~ ^ | )
s873526278
p03775
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; int score; int che(int n){ while(n > 0){ n /= 10; ++score; } return score; } int main() { int N; cin >> N; vector<int> c(N); for(int a = 1; a < sqrt(N); ++a){ int b = N / a; if (N % a == 0){ c.push_back(che(a)); } } max = *max_element(c.begin(), c.end()); cout << max << endl; }
a.cc: In function 'int main()': a.cc:18:22: error: 'sqrt' was not declared in this scope 18 | for(int a = 1; a < sqrt(N); ++a){ | ^~~~ a.cc:24:40: error: overloaded function with no contextual type information 24 | max = *max_element(c.begin(), c.end()); | ^ a.cc:25:8: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>') 25 | cout << max << endl; | ~~~~~^~~~~~ In file included from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 301 | operator<<(const void* __p) | ^~~~~~~~ /usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*' 301 | operator<<(const void* __p) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_
s031951645
p03775
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; int score; int che(int n){ while(n > 0){ n /= 10; ++score; } return score; } int main() { int N; cin >> N; vector<int> c(N); for(int a = 1; a < sqrt(N); ++a){ int b = N / a; if (N % a == 0){ c.push_back(che(a)); } } max = *max_element(c.begin(), c.end()); cout << max << endl; }
a.cc: In function 'int main()': a.cc:18:22: error: 'sqrt' was not declared in this scope 18 | for(int a = 1; a < sqrt(N); ++a){ | ^~~~ a.cc:24:40: error: overloaded function with no contextual type information 24 | max = *max_element(c.begin(), c.end()); | ^ a.cc:25:8: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>') 25 | cout << max << endl; | ~~~~~^~~~~~ In file included from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 301 | operator<<(const void* __p) | ^~~~~~~~ /usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*' 301 | operator<<(const void* __p) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_
s766025477
p03775
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; int n, score; int che(n){ while(n > 0){ n /= 10; ++score; } return score; } int main() { int N; cin >> N; vector<int> c(N); for(int a = 1; a < sqrt(N); ++a){ int b = N / a; if (N % a == 0){ c.push_back(che(a)); } } max = *max_element(c.begin(), c.end()); cout << max << endl; }
a.cc:6:11: error: expected ',' or ';' before '{' token 6 | int che(n){ | ^ a.cc: In function 'int main()': a.cc:18:22: error: 'sqrt' was not declared in this scope 18 | for(int a = 1; a < sqrt(N); ++a){ | ^~~~ a.cc:21:22: error: 'che' cannot be used as a function 21 | c.push_back(che(a)); | ~~~^~~ a.cc:24:40: error: overloaded function with no contextual type information 24 | max = *max_element(c.begin(), c.end()); | ^ a.cc:25:8: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>') 25 | cout << max << endl; | ~~~~~^~~~~~ In file included from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 301 | operator<<(const void* __p) | ^~~~~~~~ /usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*' 301 | operator<<(const void* __p) | ~~~~~~~~~~~~^~~ /usr/include/c++/1
s243451260
p03775
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n,b,ans=1e9; cin>>n; for(int a=1;a<=100000;i++){ if(n%a==0){ int keta=0; b=n/a; while(b){ b/=10; keta++; } ans=min(ans,keta); } } if(ans==1e9){ int keta=0; while(n){ n/=10; keta++; } cout<<keta<<endl; return 0; } cout<<ans<<endl; }
a.cc: In function 'int main()': a.cc:7:25: error: 'i' was not declared in this scope 7 | for(int a=1;a<=100000;i++){ | ^
s240673926
p03775
C++
#include<iostream> #include<algorithm> using namespace std; using ll = long long; int cnt_digit(ll n) { int cnt = 0; while (n > 0) { n /= 10; cnt++; } return cnt; } int main() { ll n; cin >> n; int cnt = 0; int ans = cnt_digit(n); for (int i = 1; i <= sqrt(n); i++) { int b = 0; b = n % i; if (b == 0) { cnt = max(cnt_digit(i), cnt_digit(n/i)); } ans = min(ans, cnt); } cout << ans << endl; //system("pause"); return 0; }
a.cc: In function 'int main()': a.cc:20:30: error: 'sqrt' was not declared in this scope 20 | for (int i = 1; i <= sqrt(n); i++) { | ^~~~
s040829001
p03775
C++
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <climits> #include <sstream> using namespace std; int main(){ long int N; cin >> N; int F_min = INT_MAX; for(long int A = 1; A < sqrt(N); A++){ if(N % A == 0){ string a = to_string(A); string b = to_string(N / A); int f = max(a.size(), b.size()); if(f < F_min) F_min = f; } } cout << F_min << endl; return 0; }
a.cc: In function 'int main()': a.cc:16:27: error: 'sqrt' was not declared in this scope 16 | for(long int A = 1; A < sqrt(N); A++){ | ^~~~
s989937571
p03775
C++
#include<iostream> #include<vector> #include<sstream> #include<string> #include<numeric> #include <algorithm> #include<Math.h> using namespace std; int input(){ int x; cin>>x; return x; } int abs(int x){ if(x>=0){ return x; }else{ return -x; } } int gcd(int x, int y){ if(x<y){ return gcd(y,x); } if(y==0){ return x; } return gcd(y,x%y); } int moji(char i){ if(i=='a'){ return 1; } if(i=='b'){ return 2; } if(i=='c'){ return 3; } if(i=='d'){ return 4; } if(i=='e'){ return 5; } if(i=='f'){ return 6; } if(i=='g'){ return 7; } if(i=='h'){ return 8; } if(i=='i'){ return 9; } if(i=='j'){ return 10; } if(i=='k'){ return 11; } if(i=='l'){ return 12; } if(i=='m'){ return 13; } if(i=='n'){ return 14; } if(i=='o'){ return 15; } if(i=='p'){ return 16; } if(i=='q'){ return 17; } if(i=='r'){ return 18; } if(i=='s'){ return 19; } if(i=='t'){ return 20; } if(i=='u'){ return 21; } if(i=='v'){ return 22; } if(i=='w'){ return 23; } if(i=='x'){ return 24; } if(i=='y'){ return 25; } if(i=='z'){ return 26; } return 100; } int main() { long N; cin>>N; int x=-100; for(int i=1;i<(int)sqrt(N);i++){ if(N%i==0){ x=i; } } int y=N/x; int max=0; int xx=0; for(int i=0;x>0;i++){ x/=10; max++; } for(int i=0;y>0;i++){ y/=10; xx++; } if(xx>max){ max=xx; } cout<<max<<endl; }
a.cc:7:9: fatal error: Math.h: No such file or directory 7 | #include<Math.h> | ^~~~~~~~ compilation terminated.
s016748365
p03775
C++
#include<iostream> #include<vector> #include<sstream> #include<string> #include<numeric> #include <algorithm> using namespace std; int input(){ int x; cin>>x; return x; } int abs(int x){ if(x>=0){ return x; }else{ return -x; } } int gcd(int x, int y){ if(x<y){ return gcd(y,x); } if(y==0){ return x; } return gcd(y,x%y); } int moji(char i){ if(i=='a'){ return 1; } if(i=='b'){ return 2; } if(i=='c'){ return 3; } if(i=='d'){ return 4; } if(i=='e'){ return 5; } if(i=='f'){ return 6; } if(i=='g'){ return 7; } if(i=='h'){ return 8; } if(i=='i'){ return 9; } if(i=='j'){ return 10; } if(i=='k'){ return 11; } if(i=='l'){ return 12; } if(i=='m'){ return 13; } if(i=='n'){ return 14; } if(i=='o'){ return 15; } if(i=='p'){ return 16; } if(i=='q'){ return 17; } if(i=='r'){ return 18; } if(i=='s'){ return 19; } if(i=='t'){ return 20; } if(i=='u'){ return 21; } if(i=='v'){ return 22; } if(i=='w'){ return 23; } if(i=='x'){ return 24; } if(i=='y'){ return 25; } if(i=='z'){ return 26; } return 100; } int main() { long N; cin>>N; int x=-100; for(int i=1;i<(int)sqrt(N);i++){ if(N%i==0){ x=i; } } int y=N/x; int max=0; int xx=0; for(int i=0;x>0;i++){ x/=10; max++; } for(int i=0;y>0;i++){ y/=10; xx++; } if(xx>max){ max=xx; } cout<<max<<endl; }
a.cc: In function 'int main()': a.cc:119:22: error: 'sqrt' was not declared in this scope 119 | for(int i=1;i<(int)sqrt(N);i++){ | ^~~~
s883800224
p03775
C++
#include<stdio.h> #include<iostream> #include<algorithm> #include<cstdio> #include<string> #include<vector> typedef long long ll; using namespace std; const int wa=1e9+7; ll N; int main(void) { cin >> N; int mi = 10; for (int i = 1; i <= (int)sqrt(N); i++) { if (N%i != 0)continue; ll u = N / i; int k = 0; while(u > 0) { k++; u /= 10; } mi = min(mi, k); } cout << mi << endl; return 0; }
a.cc: In function 'int main()': a.cc:14:35: error: 'sqrt' was not declared in this scope 14 | for (int i = 1; i <= (int)sqrt(N); i++) { | ^~~~
s957521277
p03775
C++
#include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; long long int n; int main(){ cin>>n; for(int i=sqrt(n);i>=1;i--) { if(n%i==0){ int t=i,l=n/i; int s=1; while(l>=10){ s++; l/=10; } cout<<s; return 0; } } }
a.cc: In function 'int main()': a.cc:9:15: error: 'sqrt' was not declared in this scope 9 | for(int i=sqrt(n);i>=1;i--) | ^~~~
s974143103
p03775
C++
#include<iostream> #include<cmath> using namespace std; int main() { long long n; int m,i,x,j,y; cin>>n; m=sqrt(n); for(i=m;i>=1;i--)if(n%i==0){x=i;break;} y=n/i; for(i=0;x!=0;i++)x=x/10; for(j=0;y!=0;j++)y=y/10; cout<<max(i,j)<<ENdl; return 0; }
a.cc: In function 'int main()': a.cc:14:25: error: 'ENdl' was not declared in this scope 14 | cout<<max(i,j)<<ENdl; | ^~~~
s531457518
p03775
C++
#include<iostream> #include<cmath> using namespace std; int main() { long long n; int m,i,x,j,y; cin>>n; m=sqrt(n); for(i=m;i>=1;i--)if(n%i==0){x=i;break;} y=n/i; for(i=0;x!=0;i++)x=x/10; for(j=0;y!=0;j++)y=y/10; cout<<max(i,j) return 0; }
a.cc: In function 'int main()': a.cc:14:23: error: expected ';' before 'return' 14 | cout<<max(i,j) | ^ | ; 15 | return 0; | ~~~~~~
s138770730
p03775
C++
#include<cstdio> #include<cmath> using namespace std; long long x,sum; int ss; int main() { scanf("%lld",&x); for(int i=sqrt(x);i>0;--i) if(x%i==0) { sum=x/i; break; } while(sum>0) { ++ss; sum/=10; } printf("%d\x",ss); return 0; }
a.cc: In function 'int main()': a.cc:22:12: error: \x used with no following hex digits 22 | printf("%d\x",ss); | ^~~~~~
s802064251
p03775
C++
#include<iostream> #include<math.h> using namespace std; int main() { long long int a,za,shu,s=0; cin>>a; za=sqrt(a); for(int i=za;i>0;--i) { if(a%i==0) { shu=n/i; break; } } while(shu>0) { ++s; shu/=10; } cout<<s<<endl; return 0; }
a.cc: In function 'int main()': a.cc:13:29: error: 'n' was not declared in this scope 13 | shu=n/i; | ^
s246984264
p03775
C++
#include<iostream> using namespace std; long long n; char s[11],s2[11]; int main(){ cin>>n; for(int i=sqrt(n);i>=1;--i)if(n%i==0){ int i2=n/i; sprintf(s,"%d",i); sprintf(s2,"%d",i2); cout<<max(strlen(s),strlen(s2))<<endl; break; } return 0; }
a.cc: In function 'int main()': a.cc:7:15: error: 'sqrt' was not declared in this scope 7 | for(int i=sqrt(n);i>=1;--i)if(n%i==0){ | ^~~~ a.cc:11:19: error: 'strlen' was not declared in this scope 11 | cout<<max(strlen(s),strlen(s2))<<endl; | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 | using namespace std;
s867376319
p03775
C++
#include <iostream> #include <math.h> using namespace std; int F(long long a, long long b) { int na = 0,nb = 0; do { a /= 10; na++; } while (a > 0); do { b /= 10; nb++; } while (b > 0); return (na > nb) ? na : nb; } int main() { long long N; int n; long long min = 20000000000i64; cin >> N; for (int i = 1;i <= N;i++) { for (int j = 1;j < sqrt(N);j++) { if (N%j == 0) { n=F(j, N / j); if (n < min) min = n; } } } cout << min << endl; return 0; }
a.cc: In function 'int main()': a.cc:22:25: error: unable to find numeric literal operator 'operator""i64' 22 | long long min = 20000000000i64; | ^~~~~~~~~~~~~~
s174220236
p03775
C++
#include <iostream> #include <algorithm> #include <map> #include <vector> #include <string> using namespace std; typedef long long int lli; // 約数の列挙O(√n) map<lli, lli> prime_factor(lli n){ map<lli, lli> res; for (lli i = 2; i * i <= n; i++) { while (n % i == 0) { ++res[i]; n /= i; } } if (n != 1) res[n] = 1; return res; } int main(int argc, char const *argv[]) { lli n; cin >> n; vector<lli> pf; map<lli,lli> mp = prime_factor(n); for (auto x : mp) { for (size_t i = 0; i < x.second; i++) { pf.push_back(x.first); } } if (pf.size()==1) { pf.insert(pf.begin(),1); } int ans = 1<<10; for (size_t i = 0; i < 1<<pf.size(); i++) { bitset<64> bs64(i); lli a=1, b=1; for (int j = 0; j < pf.size(); j++) { if (bs64[j]==0) a*=pf[j]; else b*=pf[j]; } string as=to_string(a), bs=to_string(b); if (max(as.length(),bs.length())<ans) ans = max(as.length(),bs.length()); } cout << ans << endl; return 0; }
a.cc: In function 'int main(int, const char**)': a.cc:39:5: error: 'bitset' was not declared in this scope 39 | bitset<64> bs64(i); | ^~~~~~ a.cc:5:1: note: 'std::bitset' is defined in header '<bitset>'; this is probably fixable by adding '#include <bitset>' 4 | #include <vector> +++ |+#include <bitset> 5 | #include <string> a.cc:39:16: error: 'bs64' was not declared in this scope 39 | bitset<64> bs64(i); | ^~~~
s405925470
p03775
C++
#include <bits/stdc++.h> #define REP(i, n) for(int i = 0;i < n;i++) #define REPR(i, n) for(int i = n;i >= 0;i--) #define FOR(i, m, n) for(int i = m;i < n;i++) #define FORR(i, m, n) for(int i = m;i >= n;i--) #define SORT(v, n) sort(v, v+n); #define VSORT(v) sort(v.begin(), v.end()); #define llong long long #define pb(a) push_back(a) #define INF 1000000000 using namespace std; typedef pair<int, int> P; typedef pair<llong, llong> LP; typedef pair<int, P> PP; typedef pair<llong, LP> LPP; int dy[]={0, 0, 1, -1, 0}; int dx[]={1, -1, 0, 0, 0}; int Digits(int num){ int cnt = 0; while(num > 0){ num / 10; cnt++; } return cnt; } int main(){ cin.tie(0); ios::sync_with_stdio(false); int N; cin >> N; int A,B; min_num; for(A = 1;A < sqrt(N);A++){ for(B = 1;B<sqrt(N);B++){ if(A * B == N){ min_num = min(Digits(A),Digits(B)); } } } cout << min_num << endl; return 0; }
a.cc: In function 'int main()': a.cc:35:5: error: 'min_num' was not declared in this scope 35 | min_num; | ^~~~~~~
s956439452
p03775
C++
#include <iostream> #include <algorithm> #include <string> constexpr long long INF = 10000000000; long long N; double sqr; long long ans; int main() { std::cin >> N; sqr = std::sqrt(N); ans = INF; for (long long i = 1; i < sqr; i++) { if (N%i == 0) { ans = std::min(ans, std::max(i, N / i)); } } std::cout << std::to_string(ans).length() << '\n'; return 0; }
a.cc: In function 'int main()': a.cc:14:20: error: 'sqrt' is not a member of 'std'; did you mean 'sort'? 14 | sqr = std::sqrt(N); | ^~~~ | sort
s493694273
p03775
C++
#include<iostream> using namespace std; long long int n; int main() { cin>>n; for(int i=sqrt(n);i>=1;i--) { if(n%i==0) { int t=i,l=n/i; int s=1; while(l>=10) { s++; l/=10; } cout<<s; return 0; } } }
a.cc: In function 'int main()': a.cc:7:15: error: 'sqrt' was not declared in this scope 7 | for(int i=sqrt(n);i>=1;i--) | ^~~~
s473488762
p03775
C++
#include <iostream> #include <cmath> using namespace std; int main() { long long n; cin >> n; int a = 0, b = 0; for (int i = sqrt(n); i >= 1; i--) { a = i; if (n % a == 0) { b = n / a; break; } } int ret = max(int(log10(a))++, int(log10(b))++); cout << ret << endl; return 0; }
a.cc: In function 'int main()': a.cc:19:19: error: lvalue required as increment operand 19 | int ret = max(int(log10(a))++, int(log10(b))++); | ^~~~~~~~~~~~~ a.cc:19:36: error: lvalue required as increment operand 19 | int ret = max(int(log10(a))++, int(log10(b))++); | ^~~~~~~~~~~~~
s885917916
p03775
C++
#include<bits/stdc++.h> using namespace std; int count_digit(long long n){ int digit = 0; while(n>0){ tmp/=10; digit++; }; return digit; } int main(){ long long n; int min; cin>>n; long long tmp = n; min = count_digit(n); for(long long i=1;i*i<=n;i++){ if(n%i!=0)continue; long long b = n / i; int digit = max(count_digit(i), count_digit(b)) if(min>digit){ min = digit; } } cout << min << endl; }
a.cc: In function 'int count_digit(long long int)': a.cc:9:5: error: 'tmp' was not declared in this scope; did you mean 'tm'? 9 | tmp/=10; | ^~~ | tm a.cc: In function 'int main()': a.cc:27:5: error: expected ',' or ';' before 'if' 27 | if(min>digit){ | ^~
s172036639
p03775
C++
#include<iostream> #include<string> #include<algorithm> #include<vector> #include<queue> #include<stack> #include<cstdlib> #include<ctime> using namespace std; typedef long long ll; void f(int a,int b) { string s = to_string(a); string t = to_string(b); cout << max(s.size(), t.size()) << endl; } int main() { int n; cin >> n; for (int i = sqrt(n);; i++) { if (n%i == 0) { f(i, n / i); return 0; } } return 0; }
a.cc: In function 'int main()': a.cc:19:22: error: 'sqrt' was not declared in this scope 19 | for (int i = sqrt(n);; i++) { | ^~~~
s524855211
p03775
C++
#include <iostream> #include <math.h> using namespace std; int main() { int n,a,b,c=1; cin>>n; for(int i=0;i<1000000000){ if(i*i>=n){ a=i; break; } } for(int i=0;i<a;i++){ if(n%(i+1)==0){ b=(i+1); } } for(int i=0;i<10;i++){ if(b<10*c){ cout<<(i+1)<<endl; break; } c*=10; } return 0; }
a.cc: In function 'int main()': a.cc:8:33: error: expected ';' before ')' token 8 | for(int i=0;i<1000000000){ | ^ | ;
s194605696
p03775
C++
#include <bits/stdc++.h> using namespace std; using int=long long; int divitor(int q){ int t=0; while(q>0){ q/=10; t++; } return t; } int main() { int n,ans,i; cin>>n; ans=divitor(n); for( i=1;i*i<=n;i++){ if(n%i==0){ int s=max(divitor(i),divitor(n/i)); ans=min(ans,s); } } cout<<ans<<endl; return 0; }
a.cc:3:7: error: expected nested-name-specifier before 'int' 3 | using int=long long; | ^~~
s000074386
p03775
C++
#include<iostream> #include<algorithm> #include<math.h> using namespace std; using ll = long long; int main() { ll n; cin >> n; ll ans = n/2; for (int i = 1;i <= sqrt(n);i++) { if (n%i == 0) { int j = n / i; int a = 0; for (int k = 0;k < 11;k++) { if (j / 10 == 0) { a++; ans = min(ans, a); break; } a++; j /= 10; } } } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:18:50: error: no matching function for call to 'min(ll&, int&)' 18 | ans = min(ans, a); | ~~~^~~~~~~~ In file included from /usr/include/c++/14/string:51, 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, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)' 233 | min(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:233:5: note: template argument deduction/substitution failed: a.cc:18:50: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int') 18 | ans = min(ans, a); | ~~~^~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)' 281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate expects 3 arguments, 2 provided In file included from /usr/include/c++/14/algorithm:61, from a.cc:2: /usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)' 5686 | min(initializer_list<_Tp> __l) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate expects 1 argument, 2 provided /usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)' 5696 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5696:5: note: template argument deduction/substitution failed: a.cc:18:50: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int' 18 | ans = min(ans, a); | ~~~^~~~~~~~