submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s273823589
p03775
C
#include <bits/stdc++.h> using namespace std; int main(){ long long ans=114514,n,tmp; string s,t; cin >> n; for(int i=1;i<=sqrt(n);i++){ if(n%i==0){ s=to_string(n/i); t=to_string(i); if(s.size()>t.size()){ tmp=s.size(); }else{ tmp=t.size(); } ans=min(ans,...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s715373300
p03775
C++
#include <iostream> #include <algorithm> #include <cmath> #include <limits> #include <vector> #define MAX 100000000 using namespace std; int main (void) { int n,N; cin >> N; n=sqrt(N); int ans=MAX; int b=0; int size1=0, size2=0; for (int i=1; i<=n; i++) { if (N%i==0) { b=N/i; to_string(i)...
a.cc: In function 'int main()': a.cc:19:16: warning: ignoring return value of 'std::string std::__cxx11::to_string(int)', declared with attribute 'nodiscard' [-Wunused-result] 19 | to_string(i); | ~~~~~~~~~^~~ In file included from /usr/include/c++/14/string:54, from /usr/include/c...
s813721745
p03775
C++
#include<iostream> #include<math.h> using namespace std; int main(){ _int64 n; cin>>n; int b; for(int i =1;i <=sqrt(n);i++){ if(n%i==0){ b=n/i; } } int ans=0; for(;b>0;){ b=b/10; ...
a.cc: In function 'int main()': a.cc:5:9: error: '\U0000ff3fint64' was not declared in this scope 5 | _int64 n; | ^~~~~~~ a.cc:6:14: error: 'n' was not declared in this scope; did you mean 'yn'? 6 | cin>>n; | ^ | yn
s677794437
p03775
C++
#include <iostream> #include <vector> #include <map> #include <algorithm> using namespace std; int main(){ long long N; cin >> N; int max = int(sqrt(N)); int fmin_other = 1; for (int i = 2; i < max + 1; i++) { if (N % i == 0) { fmin_other = i; } } int fmin = N / fmin_other; int keta = 0; for (int i...
a.cc: In function 'int main()': a.cc:11:23: error: 'sqrt' was not declared in this scope 11 | int max = int(sqrt(N)); | ^~~~
s036670504
p03775
C++
#include <iostream> #include <vector> #include <map> #include <algorithm> using namespace std; int main(){ long long N; cin >> N; int max = int(sqrt(N)); int fmin_other = 1; for (int i = 2; i < max + 1; i++) { if (N % i == 0) { fmin_other = i; } } int fmin = N / fmin_other; int keta = 0; for (int i...
a.cc: In function 'int main()': a.cc:11:23: error: 'sqrt' was not declared in this scope 11 | int max = int(sqrt(N)); | ^~~~
s903999926
p03775
C++
#include<iostream> #include<stdio.h> #include<algorithm> #include<string> #include<cmath> #include<vector> #include<functional> #include<stack> #include<utility> #include<map> #include<queue> using namespace std; int main() { long long n,fmin=100000000000; cin >> n; for (long long i = 1; i*i <= n; i++) { if (n%i...
a.cc: In function 'int main()': a.cc:20:46: error: expected primary-expression before 'long' 20 | fmin = min(fmin, max(long long(log10(i))+1, long long(log10(n / i))+1)); | ^~~~ a.cc:20:69: error: expected primary-expression before 'long' ...
s286223649
p03775
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <string> #include <stack> #include <queue> #include <vector> #include <set> #include <cmath> #define FOR(i,a,b) for(int i=a;i<b;i++) #define MA(i,j) make_pair(i,j) #define PA pair<int,int> #define PB push_back #define PQ priority_que...
a.cc: In function 'int main()': a.cc:30:16: error: no matching function for call to 'max(int&, long long int)' 30 | int A=max(i,N/i); | ~~~^~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /us...
s514489298
p03775
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main () { ll N; cin >> N; ll ans = INT_MAX; for(int i=2; i*i<=N; i++) { if( N%i == 0 ) { ans = min(ans,max(log10(i),log10(N/i))); } } cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:12:22: error: no matching function for call to 'min(ll&, const double&)' 12 | ans = min(ans,max(log10(i),log10(N/i))); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/includ...
s757498334
p03775
C++
#include <iostream> #include "string.h" #include <vector> #include <cstdlib> #include <cstdio> #include <cmath> #include <algorithm> #include <map> #include <stack> #include <queue> #include <set> using namespace std; #define MAX_N 2000000 #define ll long long ll N; unsigned long long gcd(unsigned long long a,unsign...
a.cc: In function 'int main()': a.cc:34:19: error: 'INT_MAX' was not declared in this scope 34 | int ans = INT_MAX; | ^~~~~~~ a.cc:12:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 11 | #include <set> +++ |+#include <c...
s720607147
p03775
C++
using namespace std; size_t max_len(uint64_t a, uint64_t b) { return max(to_string(a).size(), to_string(b).size()); } int32_t main() { uint64_t N; cin >> N; uint64_t n = (uint64_t)sqrt(N); uint64_t m = 0; for (uint64_t i = 1; i <= n; i++) { if ((N % i) == 0) { m = max(m, max_len(i, N / i)); ...
a.cc:3:1: error: 'size_t' does not name a type 3 | size_t max_len(uint64_t a, uint64_t b) | ^~~~~~ a.cc:1:1: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' +++ |+#include <cstddef> 1 | using namespace std; a.cc:8:1: error: 'int32_t' does not name...
s448160549
p03775
C
#include <stdio.h> int main() { long n, a, b, i, result; scanf("%ld", &N); for(a = 1; a*a <= n; a++) { if(n%a == 0) { b = n/a; i = 0; while(b > 0) { b /= 10; i++; } if(i < n) { result = i; } } } ...
main.c: In function 'main': main.c:5:21: error: 'N' undeclared (first use in this function) 5 | scanf("%ld", &N); | ^ main.c:5:21: note: each undeclared identifier is reported only once for each function it appears in
s999557983
p03775
C
#include <stdio.h> //#define BUFSIZE 100 int f(long int x, long int y); int main() { long int n, a, b int min, r; scanf("%ld",&n); if(n<1 || n>10000000000){ printf("error\n"); return 1; } a = 1; b = n; min = f(a,b); while(a <= b){ do{ a++; }while(n % a != 0); b = n / a; r = f...
main.c: In function 'main': main.c:8:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' 8 | int min, r; | ^~~ main.c:15:17: error: 'b' undeclared (first use in this function) 15 | b = n; | ^ main.c:15:17: note: each...
s065668448
p03775
C
#include <stdio.h> //#define BUFSIZE 1024 int f(int x, int y); int main() { int n, a, b, min, r; scanf("%d",&n); if(n<1 || n>10000000000){ printf("error\n"); return 1; } a = 1; b = n; min = f(a,b); while(a < b){ do{ a++; }while(n % a != 0); b = n / a; r = f(a,b); if(r < min)...
main.c: In function 'f': main.c:45:17: error: expected declaration or statement at end of input 45 | return c; | ^~~~~~
s090232422
p03775
C++
#include <iostream> #include<sstream> #include<vector> #include<iterator> #include<cmath> using namespace std; int main(void) { long long N; cin >> N; unsigned int ret = to_string(N).size(); for(long long i=2; i<sqrt(N)+1; i++) { if(N%i != 0) continue; ret = min(ret, max(to_string(i).size(), to_string(N/...
a.cc: In function 'int main()': a.cc:19:26: error: no matching function for call to 'min(unsigned int&, const long unsigned int&)' 19 | ret = min(ret, max(to_string(i).size(), to_string(N/i).size())); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file incl...
s388846395
p03775
C++
#include <iostream> #include <string> #include <algorithm> #include <cmath> using namespace std; int digit (long long a) { int d; for(d=0; a; d++){ a /= 10; } return d; } int main() { long long n; cin >> n; int dig = 0; for(long long i=1; i<=sqrt(n)+1; i++){ if(n % i == 0){ dig = max(digit(i)...
a.cc: In function 'int main()': a.cc:27:25: error: 'ans' was not declared in this scope; did you mean 'abs'? 27 | ans = min(ans, dig); | ^~~ | abs a.cc:31:17: error: 'ans' was not declared in this scope; did you mean 'abs'? 31 | ...
s237697803
p03775
C
#include <stdio.h> #include <stdlib.h> #include <math.h> long int digit(long int num){ long int dig=0; while (num!=0) { dig++; num/=10; } return dig; } int main() { int j=0; long int N,i,flag,a=1,b=1; scanf("%ld",&N); flag=N; for(i=2;i<=(long int)sqrt(N);i++){ ...
main.c: In function 'main': main.c:43:10: error: 'box' undeclared (first use in this function) 43 | free(box); | ^~~ main.c:43:10: note: each undeclared identifier is reported only once for each function it appears in
s488726850
p03775
C++
#include<iostream> #include<cmath> #include<algorithm> #include<string> using namespace std; bool IsPrime(long long num) { if (num < 2) return false; else if (num == 2) return true; else if (num % 2 == 0) return false; // 偶数はあらかじめ除く double sqrtNum = sqrt(num); for (int i = 3; i <= sqrtNum; i += 2)...
a.cc: In function 'int main()': a.cc:42:28: error: 'max' cannot be used as a function 42 | cout << max(to_string(max[0]).length(),to_string(max[1]).length()) << endl; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
s723472218
p03775
C++
#include<iostream> #include<cmath> #include<algorithm> #include<string> using namespace std; bool IsPrime(long long num) { if (num < 2) return false; else if (num == 2) return true; else if (num % 2 == 0) return false; // 偶数はあらかじめ除く double sqrtNum = sqrt(num); for (int i = 3; i <= sqrtNum; i += 2)...
a.cc: In function 'int main()': a.cc:29:22: error: invalid use of non-static member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type...
s669370856
p03775
Java
import java.util.Scanner; public class Main2{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); long n = sc.nextInt(); double sqrtN = Math.sqrt(n); int min = String.valueOf(n).length(); for(int i=1; i <= sqrtN; i++){ if(n % i == 0) min = Math.min(min, ...
Main.java:3: error: class Main2 is public, should be declared in a file named Main2.java public class Main2{ ^ 1 error
s658148663
p03775
C++
#include<iostream> #include <cstdlib> #include<list> #include<stdio.h> #include<vector> #include<algorithm> #include<string> #include<stack> using namespace std; int main() { //cout << 1 / 10 << endl; long long n; cin >> n; bool zz = false; long long mini=100000000; long long hh = sqrt(n) + 1; for (long long i =hh...
a.cc: In function 'int main()': a.cc:14:24: error: 'sqrt' was not declared in this scope 14 | long long hh = sqrt(n) + 1; | ^~~~
s959589467
p03775
C++
#include<iostream> #include <cstdlib> #include<list> #include<stdio.h> #include<vector> #include<algorithm> #include<string> #include<stack> using namespace std; int main() { //cout << 1 / 10 << endl; long long n; cin >> n; bool zz = false; long long mini=100000000; long long hh = sqrt(n) + 1; for (long long i =hh...
a.cc: In function 'int main()': a.cc:14:24: error: 'sqrt' was not declared in this scope 14 | long long hh = sqrt(n) + 1; | ^~~~
s106558632
p03775
C++
#include <iostream> #include <cstdlib> #include <cmath> using namespace std; int main(void) { unsigned long long n, max, ans = 999999999; cin >> n; max = sqrt((double)n); ...
a.cc:17:18: error: stray '\' in program 17 | r\\eturn 0; | ^ a.cc:17:19: error: stray '\' in program 17 | r\\eturn 0; | ^ a.cc: In function 'int main()': a.cc:17:17: error: 'r' was not declared in this scope 17 | r\\...
s418286125
p03775
C++
#include <iostream> #include <cstdlib> #include <cmath> using namespace std; int main(void) { unsinged long long n, max, ans = 999999999; cin >> n; max = sqrt((double)n); ...
a.cc: In function 'int main()': a.cc:8:17: error: 'unsinged' was not declared in this scope; did you mean 'unsigned'? 8 | unsinged long long n, max, ans = 999999999; | ^~~~~~~~ | unsigned a.cc:9:8: error: 'n' was not declared in this scope; did you mean 'y...
s497262179
p03775
C++
#include <iostream> #include <stdlib> #include <cmath> using namespace std; int main(void) { int n, a, b, max, ans = 9999999999999; max = sqrt((double)n); for (int i = 1; i <= max; i++) if (n % i) ans = min(ans, log10(n / i) + 1); cout << ans << endl; return 0; ...
a.cc:2:14: fatal error: stdlib: No such file or directory 2 | #include <stdlib> | ^~~~~~~~ compilation terminated.
s106124082
p03775
C++
#include <iostream> #include <stdlib> #include <cmath> using namespace std; int main(void) { int n, a, b, max, ans = 9999999999999; max = sqrt((double)n); for (int i = 1; i <= MAX; i++) if (n % i) ans = min(ans, log10(N / i) + 1); cout << ans << endl; return 0; }
a.cc:2:10: fatal error: stdlib: No such file or directory 2 | #include <stdlib> | ^~~~~~~~ compilation terminated.
s913009069
p03775
C++
#include <iostream> #include<cstdio> #include<cstdlib> #include<cmath> #include<cstring> #include<string> #include<stack> #include <queue> #include<algorithm> typedef long long int ll; using namespace std; #define FOR(i,a,b) for (int i=(a);i<(b);i++) #define REP(i,n) for (int i=0;i<(n);i++) #define EREP(i,n) for (int i...
a.cc: In function 'int main()': a.cc:25:16: error: no matching function for call to 'min(__gnu_cxx::__enable_if<true, double>::__type, ll&)' 25 | ans=min(log10(A)+1,ans); | ~~~^~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bit...
s543632061
p03775
C++
#include<iostream> #include<cmath> using namespace std; unsigned long long int N, l, m = 9999999999999; unsigned long long int ten(unsigned long long int ou); int main(){ for(unsigned long long int i ;i < sqrt(N); i++){ if((N % i)==0 ){ l = ten(N/i); ...
a.cc: In function 'long long unsigned int ten(long long unsigned int)': a.cc:24:20: error: 'in' was not declared in this scope; did you mean 'i'? 24 | if(in == 0) break; | ^~ | i
s274107680
p03775
C++
#include<iostream> #include<cmath> using namespace std; unsigned long long int N, l, max = 9999999999999; unsigned long long int ten(unsigned long long int ou); int main(){ for(unsigned long long int i ;i < sqrt(N); i++){ if((N % i)==0 ){ l = ten(N/i); ...
a.cc: In function 'int main()': a.cc:14:32: error: reference to 'max' is ambiguous 14 | if(l < max) max = l; | ^~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, fro...
s872214626
p03775
C++
#include<iostream> #include<cmath> using namespace std; unsigned long long int N, l, max = 9999999999999; unsigned long long int ten(unsigned long long int ou); int main(){ for(unsigned long long int i ;i < sqrt(N); i++){ if(N % i==0 ){ l = ten(N/i); ...
a.cc: In function 'int main()': a.cc:14:32: error: reference to 'max' is ambiguous 14 | if(l < max) max = l; | ^~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, fro...
s850321245
p03775
C++
#include<iostream> #include<cmath> using namespace std; unsigned long long int N, l, max = 9999999999999; unsigned long long int ten(unsigned long long int ou); int main(){ for(unsigned long long int i ;i < sqrt(N); i++){ if(N % i==0 ){ l = ten(N/i); if(l < max) max = l; } } cout << max; } unsigned lo...
a.cc: In function 'int main()': a.cc:14:32: error: reference to 'max' is ambiguous 14 | if(l < max) max = l; | ^~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, fro...
s120744864
p03775
C++
#include<iostream> #include<cmath> using namespace std; unsigned long long int N, l, max = 9999999999999; int l; unsigned long long int ten(unsigned long long int ou); int main(){ for(unsigned long long int i ;i < sqrt(N); i++){ if(N % i==0 ){ l = ten(N/i); if(l < max) max = l; } } cout << max; } unsi...
a.cc:7:5: error: conflicting declaration 'int l' 7 | int l; | ^ a.cc:6:27: note: previous declaration as 'long long unsigned int l' 6 | unsigned long long int N, l, max = 9999999999999; | ^ a.cc: In function 'int main()': a.cc:15:32: error: reference to 'max' is ambiguo...
s441613264
p03775
C++
#include<iostream> #include<cmath> using namespace std; unsigned long long int N, max = 9999999999999, l; int l; unsigned long long int ten(unsigned long long int ou); int main(){ for(unsigned long long int i ;i < sqrt(N); i++){ if(N % i==0 ){ l = ten(N/i); if(l < max) max = l; } } cout << max; } unsi...
a.cc:7:5: error: conflicting declaration 'int l' 7 | int l; | ^ a.cc:6:48: note: previous declaration as 'long long unsigned int l' 6 | unsigned long long int N, max = 9999999999999, l; | ^ a.cc: In function 'int main()': a.cc:15:32: error: referenc...
s695251453
p03775
C++
#include<iostream> #include<cmath> using namespace std; unsigned long long int N, max = 9999999999999; int l; int ten(unsigned long long int ou); int main(){ for(unsigned long long int i ;i < sqrt(N); i++){ if(N % i==0 ){ l = ten(N/i); if(l < max) max = l; } } cout << max; } int ten(unsigned long long...
a.cc: In function 'int main()': a.cc:15:32: error: reference to 'max' is ambiguous 15 | if(l < max) max = l; | ^~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, fro...
s235955889
p03775
C++
#include<iostream> #include<algorithm> #include<cmath> using namespace std; unsigned long long int N, max = 9999999999999; int l; int ten(unsigned long long int ou); int main(){ for(unsigned long long int i ;i < sqrt(N); i++){ if(N % i==0 ){ l = ten(N/i); if(l < max) max = l; } } cout << max; } int te...
a.cc: In function 'int main()': a.cc:16:32: error: reference to 'max' is ambiguous 16 | if(l < max) max = l; | ^~~ In file included from /usr/include/c++/14/algorithm:61, from a.cc:2: /usr/include/c++/14/bits/stl_algo.h:5716:5: note: candi...
s442678938
p03775
C++
#include<iostream> #include<algorithm> #include<cmath> using namespace std; unsigned long long int N, max = 9999999999999; int l; int ten(unsigned long long int in); int main(){ for(unsigned long long int i ;i < sqrt(N); i++){ if(N % i==0 ){ l = ten(N/i); if(l < max) max = l; } } cout << max; } int te...
a.cc: In function 'int main()': a.cc:16:32: error: reference to 'max' is ambiguous 16 | if(l < max) max = l; | ^~~ In file included from /usr/include/c++/14/algorithm:61, from a.cc:2: /usr/include/c++/14/bits/stl_algo.h:5716:5: note: candi...
s710455175
p03775
C++
#include<iostream> #include<algorithm> #include<cmath> using namespace std; unsigned long long int N, max = 9999999999999, l; int ten(unsigned long long int in); int main(){ for(unsigned long long int i ;i < sqrt(N); i++){ if(N % i==0 ){ l = ten(N/i); if(l < max) max = l; } } cout << max; } int ten(un...
a.cc: In function 'int main()': a.cc:15:32: error: reference to 'max' is ambiguous 15 | if(l < max) max = l; | ^~~ In file included from /usr/include/c++/14/algorithm:61, from a.cc:2: /usr/include/c++/14/bits/stl_algo.h:5716:5: note: candi...
s484092324
p03775
C++
#include<iostream> #include<algorithm> #include<cmath> using namespace std; unsigned long long int N, max= 0, l; int ten(unsigned long long int in); int main(){ for(unsigned long long int i ;i < sqrt(N); i++){ if(N % i==0 ){ l = ten(N/i); if(l < max) max = l; } } cout << max; } int ten(unsigned long l...
a.cc: In function 'int main()': a.cc:15:32: error: reference to 'max' is ambiguous 15 | if(l < max) max = l; | ^~~ In file included from /usr/include/c++/14/algorithm:61, from a.cc:2: /usr/include/c++/14/bits/stl_algo.h:5716:5: note: candi...
s258483514
p03775
C++
#include<iostream> #include<algorithm> #include<cmath> unsigned long long int N, max= 0, l; int main(){ for(unsigned long long int i ;i < sqrt(N); i++){ if(N % i==0 ){ l = ten(N/i); if(l < max) max = l; } } cout << max; } int ten(unsigned long long int in){ int i; for(i = 1; ;i++){ in /= 10; if(in...
a.cc: In function 'int main()': a.cc:10:29: error: 'ten' was not declared in this scope; did you mean 'tan'? 10 | l = ten(N/i); | ^~~ | tan a.cc:14:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? ...
s652203866
p03775
Java
/* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; /* Name of the class has to be "Main" only if the class is public. */ class Main { public static void main (String[] args) throws java.lang.Exception { Scanner sc = new Scanner(system.in); long test = ...
Main.java:12: error: cannot find symbol Scanner sc = new Scanner(system.in); ^ symbol: variable system location: class Main 1 error
s406871076
p03775
C++
typedef vector<P> vp; const int MX = 100005, INF = 1001001001; const ll LINF = 1e18; const double eps = 1e-10; ll n; int main(){ cin >> n; ll ans; rrep(i, (int)sqrt(n)) if(n % i == 0) ans = n / i; int digit = 0; while(ans > 0){ ans /= 10; digit++; } cout << digit << endl; return 0; }
a.cc:1:9: error: 'vector' does not name a type 1 | typedef vector<P> vp; | ^~~~~~ a.cc:3:7: error: 'll' does not name a type 3 | const ll LINF = 1e18; | ^~ a.cc:6:1: error: 'll' does not name a type 6 | ll n; | ^~ a.cc: In function 'int main()': a.cc:9:3: error: 'cin' was not...
s092636792
p03775
C++
#include <iostream> #include <math.h> int main(){ int N,ans,a,b; cin >> N; for(int i=0;i*i<=N;i++){ if(N%i==0){ a=i; b=N/i; } } if(a>b){ ans=log10(a)+1; }else{ ans=log10(b)+1; } cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin >> N; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to sta...
s652138265
p03775
C++
#include <iostream> #include <cmath> using namespace std; int digits(int n){ for(int i = 0; n < 1; i++) n /= 10; return i; } int min(int a, int b){ return a < b ? a : b; } int main(void){ int n; int ans = 6; cin >> n; for(int i = 1; i < sqrt(n); i++){ if(n % i == 0) ans = min(ans, digit...
a.cc: In function 'int digits(int)': a.cc:10:10: error: 'i' was not declared in this scope 10 | return i; | ^
s796796977
p03775
C++
int main(){ long N = 0; cin >> N; double FN = double(N); int minVal = 1000000000; int harf = N/2 + 1; for(int i = 0; i < harf + 1; i++){ float x = FN / i; long ix = long(x); if(ix * i == N){ int val = max(log10(ix) + 1, log10(i) + 1); minVal = v...
a.cc: In function 'int main()': a.cc:4:5: error: 'cin' was not declared in this scope 4 | cin >> N; | ^~~ a.cc:13:27: error: 'log10' was not declared in this scope 13 | int val = max(log10(ix) + 1, log10(i) + 1); | ^~~~~ a.cc:13:23: error: 'max' was not d...
s348121421
p03775
Java
import java.util.*; class Main{ public static void main(String[]args){ Scanner cin=new Scanner(System.in); long input; long larger; ArrayList<int> value = new ArrayList<Integer>(); input=cin.nextInt(); for(long i=1;i*i<=input;i++){ if(input%i==0){ ...
Main.java:7: error: unexpected type ArrayList<int> value = new ArrayList<Integer>(); ^ required: reference found: int 1 error
s478953230
p03775
Java
import java.util.*; class Main{ public static void main(String[]args){ Scanner cin=new Scanner(System.in); int input; int mini; int minj; ArrayList<Integer> value = new ArrayList<Integer>(); input=cin.nextInt(); for(int i=1;i*i<=input;i++){ for(int...
Main.java:13: error: cannot find symbol mini = String.ValueOf(i).length(); ^ symbol: method ValueOf(int) location: class String Main.java:14: error: cannot find symbol minj = String.ValueOf(j).length(); ^ s...
s384994124
p03775
C++
#include<vector> using namespace std; int num_dig(int64_t x) { int dig = 0; while (x > 0) { x /= 10; dig++; } return dig; } int main() { int64_t n; cin >> n; int ans = 11; for (int64_t i = 1; i < n/2; i++) { if (n % i == 0) { int tmp = max(num_dig(n / i), num_dig(i)); if (ans > tmp) ans = tmp; } } ...
a.cc:4:13: error: 'int64_t' was not declared in this scope 4 | int num_dig(int64_t x) { | ^~~~~~~ a.cc:2:1: note: 'int64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' 1 | #include<vector> +++ |+#include <cstdint> 2 | using namespace std; a.c...
s371463081
p03775
C++
#include <iostream> #include <algorithm> using namespace std; using ll=long long; int CountDigit(ll num); int main() { ll N; cin >> N; int ans = CountDigit(N); for (ll A = 1LL; A * A =< N; A++) { if (N % A != 0) continue; int cur; ll B = N / A; cur = max(CountDig...
a.cc: In function 'int main()': a.cc:15:29: error: expected primary-expression before '<' token 15 | for (ll A = 1LL; A * A =< N; A++) | ^
s225727503
p03775
C++
#include <iostream> #include <algorithm> using namespace std; using ll=long long; int CountDigit(ll num); int main() { ll N; cin >> N; int ans = CountDigit(N); for (ll A = 1LL; A * A= < N; A++) { if (N % A != 0) continue; int cur; ll B = N / A; cur = max(CountDig...
a.cc: In function 'int main()': a.cc:15:29: error: expected primary-expression before '<' token 15 | for (ll A = 1LL; A * A= < N; A++) | ^
s240055782
p03775
C++
#include <iostream> #include <algorithm> using namespace std; using ll=long long; int CountDigit(ll num); int main() { ll N; int ans = CountDigit(N); cin >> N; for (ll A = 1LL; A * A < N; A++) { int cur; ll B = N / A; cur = max(CountDigit(A), CountDigit(B)); ...
a.cc:22:5: error: 'cout' does not name a type 22 | cout << ans << endl; | ^~~~ a.cc:24:5: error: expected unqualified-id before 'return' 24 | return 0; | ^~~~~~ a.cc:25:1: error: expected declaration before '}' token 25 | } | ^
s553291478
p03775
Java
import java.util.*; public class DigitsinMultiplication { public static void main(String[] args) { // TODO Auto-generated method stub Scanner s=new Scanner(System.in); long N=s.nextLong(); int F=0; String a,b; int i=0; int min=100; for(i=1;i*i<=N;i++){ if(N%i!=0)continue; ...
Main.java:3: error: class DigitsinMultiplication is public, should be declared in a file named DigitsinMultiplication.java public class DigitsinMultiplication { ^ 1 error
s509927871
p03775
C
#include<stdio.h> #include<math.h> #include<stdlib.h> #include<string.h> int main(void) { int i, num, rem,min,len; double lim; char wln[13]; //整数Nの入力 scanf("%d", &num); lim = sqrt(num)-1.0; min = 11; for (i = num; i >lim; i--) { rem = num%i; if (rem == 0) { itoa(i, wln, 10); len= strlen(wln); ...
main.c: In function 'main': main.c:21:25: error: implicit declaration of function 'itoa' [-Wimplicit-function-declaration] 21 | itoa(i, wln, 10); | ^~~~
s667380655
p03775
C++
#include <bits/stdc++.h> using namespace std; int main(){ long long A,B,C,N,X=0,MINI=10; cin >> N; B=N; for(long long A=1;A<max(N,100000);A++){ if(N%A==0){ B=C=N/A; while(C!=0){ C/=10; X++; } if(MINI>X){ MINI=X; } X=0; } } if(N==1){cout <<...
a.cc: In function 'int main()': a.cc:8:26: error: no matching function for call to 'max(long long int&, int)' 8 | for(long long A=1;A<max(N,100000);A++){ | ~~~^~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/b...
s911845321
p03775
C++
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); long n = sc.nextLong(); int sq = (int)(Math.sqrt(n)); int ans = 0, i; for(i = 1; i < sq; i++){ ans = (int)(Math.log10(n / i)) + 1; } System.out.println(ans); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s798323768
p03775
C++
#include <iostream> #include <sstream> using namespace std; int calc_digit(int n){ stringstream ss; ss << n; return ss.str().size(); } int main(void){ long long n;cin >> n; int a=2,d=1; int res=1; while(true){ if(a>=n) break; if(n%a==0){ res=max(res,calc_digit(n/a)); a = pow(10,++d); } } cout << ...
a.cc: In function 'int main()': a.cc:19:29: error: 'pow' was not declared in this scope 19 | a = pow(10,++d); | ^~~
s376394254
p03775
C++
#include <bits/stdc++.h> using namespace std; // 正の数の桁数を取得 int GetDigit( const __int64 iNum ) { // 入力チェック if( iNum < 0 ) return - 1; // エラー else if( iNum == 0 ) return 0; else if( iNum < 10 ) return 1; else if( iNum < 100 ) return 2; else if( iNum < 1000 ) return 3; else if( iNum < 10000 ) return 4...
a.cc:5:21: error: '__int64' does not name a type; did you mean '__int64_t'? 5 | int GetDigit( const __int64 iNum ) | ^~~~~~~ | __int64_t a.cc: In function 'int main(int, char**)': a.cc:56:1: error: '__int64' was not declared in this scope; did you mean '__ynf64'? ...
s012802646
p03775
C++
#include <iostream> #include <cmath> using namespace std; int main(){ long long n, ans = 1e9; cin >> n; for(long long a = 1; a * a <= n; a++) if(n % a == 0){ ans = min(ans, to_string(n / a).size()); } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:9:26: error: no matching function for call to 'min(long long int&, std::__cxx11::basic_string<char>::size_type)' 9 | ans = min(ans, to_string(n / a).size()); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14...
s072366779
p03775
C++
#include<iostream> using namespace std; int F(long long int a, long long int b); int main(){ long long int N; int max = INT_MAX; cin >> N; for(long long int i = 1; i <= sqrt((double)N); i++){ if(N % i == 0){ if(max > F(N / i, i)){ max = F(N / i, i); } } } cout << max << endl; return 0; } int F(...
a.cc: In function 'int main()': a.cc:9:19: error: 'INT_MAX' was not declared in this scope 9 | int max = INT_MAX; | ^~~~~~~ a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 1 | #include<iostream> +++ |+#include ...
s351049474
p03775
C++
#include<iostream> using namespace std; int F(long long int a, long long int b); int main(){ long long int N; int max = INT_MAX; cin >> N; for(long long int i = 1; i <= sqrt((double)N); i++){ if(N % i == 0){ if(max > F(N / i, i)){ max = F(N / i, i); } } } cout << max << endl; return 0; } int F(...
a.cc: In function 'int main()': a.cc:9:19: error: 'INT_MAX' was not declared in this scope 9 | int max = INT_MAX; | ^~~~~~~ a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 1 | #include<iostream> +++ |+#include ...
s250861438
p03775
Java
import java.util.Scanner; public class ABC057C { public static void main(String[] args) { ABC057CSolve solve = new ABC057CSolve(); solve.main(); } } class ABC057CSolve { long N; ABC057CSolve() { Scanner cin = new Scanner(System.in); this.N = cin.nextLong(); } void main() { long min = Long.MAX_VAL...
Main.java:2: error: class ABC057C is public, should be declared in a file named ABC057C.java public class ABC057C { ^ 1 error
s082590562
p03775
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.*; import java.math.*; public class Main { public static void main(String[] args)throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringBuilder sb = new Strin...
Main.java:16: error: variable f is already defined in method main(String[]) int f = Math.min(f,Math.max(String.valueOf(a).length(),String.valueOf(i).length())); ^ 1 error
s930343500
p03775
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class ABC57C { public static void main(String[] args) throws IOException { // TODO 自動生成されたメソッド・スタブ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); long N = Long.parseLong(br.readLine(...
Main.java:5: error: class ABC57C is public, should be declared in a file named ABC57C.java public class ABC57C ^ 1 error
s493448555
p03775
C++
#include<bits/stdc++.h> using namespace std; #define ll long long ll n; int main(void){ cin >> n; int ans = 100; for(ll i=1;i*i<=n;i++){ if (n%i==0) ans = min(ans, to_string(max(n, n/i)).size()); } cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:24: error: no matching function for call to 'min(int&, std::__cxx11::basic_string<char>::size_type)' 9 | if (n%i==0) ans = min(ans, to_string(max(n, n/i)).size()); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/a...
s397576440
p03775
C++
#include <iostream> #include <math.h> #include <vector> using namespace std;; using ll=long long; int cnt_digits(int N){ int digits=0; while(N > 0){ N/=10; digits++; } return digits; } int main(){ ll N; cin >> N; int ans=cnt_digits(N); for(ll A=1LL; A*A<=N; A++)...
a.cc: In function 'int main()': a.cc:28:38: error: 'A_' was not declared in this scope; did you mean 'A'? 28 | const int cur=max(cnt_digits(A_, cnt_digits(B))); | ^~ | A
s710871207
p03775
Java
public class Main { public static int getDigitsNum(long x){ return String.valueOf(x).length(); } public static void main(String[] args) { long N; Scanner scanner = new Scanner(System.in); N = scanner.nextLong(); scanner.close(); long maxDivisor = (long)Math.sqrt(N); long divisor = 2; int mi...
Main.java:11: error: cannot find symbol Scanner scanner = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:11: error: cannot find symbol Scanner scanner = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s715477738
p03775
C++
#include <iostream> #include <string> #include <queue> #include <stack> #include <algorithm> #include <list> #include <vector> #include <complex> #include <utility> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <climits> #include <bitset> #include <ctime> #include <map> #include <uno...
a.cc: In function 'int main()': a.cc:83:30: error: no matching function for call to 'chmin(int&, const long unsigned int&)' 83 | chmin(ans, max(to_string(N / i).size(), to_string(i).size())); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:58...
s390530455
p03775
C++
#include <cstdio> #include <algorithm> #include <iostream> #include <vector> #include <math.h> #define INF (int)1e9 #define pb push_back using namespace std; int keta(long long int n){ int i=1; while(n>9){ i++; n/=10; } return i; } int main(void){ long long int n,nn; cin>>n; long long int i; l...
a.cc: In function 'int main()': a.cc:29:7: error: 'a' was not declared in this scope 29 | a=i; | ^ a.cc:30:7: error: 'b' was not declared in this scope 30 | b=n/i; | ^
s944764230
p03775
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); long n = sc.nextLong(); double a=0; boolean warikire = false; for(int i=2; i<=Math.sqrt(n); i++){ if( n%i == 0 ){ a = i; warikire = true; } } if(warikire){ System.out.p...
Main.java:18: error: incompatible types: possible lossy conversion from double to long System.out.println( keta(n/a) ); ^ Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 1 error
s250315323
p03775
C++
1.#include<stdio.h> #include<math.h> int main() { int N; scanf("%d",&N); int A,B,i,least,f; for(A=1;A<=N;A++) { if(N%A) continue; else B=N/A; if(A>=B) { while(A/pow(10,i)>1) i++; f=(int)(A/pow(10,i)); } else { while(B/pow(10,i)>1) i++; f...
a.cc:2:3: error: stray '#' in program 2 | 1.#include<stdio.h> | ^ a.cc:2:1: error: expected unqualified-id before numeric constant 2 | 1.#include<stdio.h> | ^~ In file included from /usr/include/c++/14/cmath:45, from /usr/include/c++/14/math.h:36, from a.cc:3: /us...
s360543248
p03775
C++
#include<stdio.h> #include<math.h> int main() { int N; scanf("%d",&N); int A,B,i,least,f; for(A=1;A<=N;A++) { if(N%A) continue; else B=N/A; if(A>=B) { while(A/pow(10,i)>1) i++; f=(int)(A/pow(10,i); } else { while(B/pow(10,i)>1) i++; f=(in...
a.cc: In function 'int main()': a.cc:18:26: error: expected ')' before ';' token 18 | f=(int)(A/pow(10,i); | ~ ^ | ) a.cc:24:26: error: expected ')' before ';' token 24 | f=(int)(B/pow(10,i); | ~ ^ | ...
s979586785
p03775
C++
#include<iostream> #include<algorithm> #include<cmath> #include<cstring> #include<cstdlib> int num(int x){ char s[10]; itoa(x,s,10); return strlen(s); } int F(int a,int b){ if (num(a)>=num(b) ) return num(a); else return num(b); } using namespace std; int main() { int n; cin>>n; int minF=11; for(int i=...
a.cc: In function 'int num(int)': a.cc:8:9: error: 'itoa' was not declared in this scope 8 | itoa(x,s,10); | ^~~~
s662979772
p03775
C++
#include<iostream> #include<algorithm> #include<cmath> #include<cstring> int num(int x){ char s[10]; itoa(x,s,10); return strlen(s); } int F(int a,int b){ if (num(a)>=num(b) ) return num(a); else return num(b); } using namespace std; int main() { int n; cin>>n; int minF=11; for(int i=1;i<=floor(sqrt(n)...
a.cc: In function 'int num(int)': a.cc:7:9: error: 'itoa' was not declared in this scope 7 | itoa(x,s,10); | ^~~~
s209399434
p03775
C++
#include <iostream> #include <math.h> using namespace std; int main(){ int n,a,b,c,d; cin >> n; a = sqrt(n); if (n%2!=0){ if (a%2==0){a+=1;} while (n%a!=0){a+=2;} } else{ while (n%a!=0){a+=1;} } b = n/a; c=string(a).length d=string(b).length cout << m...
a.cc: In function 'int main()': a.cc:17:15: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int&)' 17 | c=string(a).length | ^ In file included from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s954101375
p03775
C++
#include <iostream> #include <algorithm> using namespace std; long N; long GetDigit(long num) { return log10(num) + 1; } void solve() { long A = 1; long d = GetDigit(N); for (long i = 0; i < N; i++) { for (long j = 0; j < N; j++) { if (N % A == 0) { d = min(d, GetDigit(N / A)); } } } cout << d <<...
a.cc: In function 'long int GetDigit(long int)': a.cc:8:16: error: 'log10' was not declared in this scope 8 | return log10(num) + 1; | ^~~~~
s927436523
p03775
C++
#include <iostream> #include <math.h> using namespace std; int main(){ int n,a,b,c,d; cin >> n; a = sqrt(n); if (n%2!=0){ if (a%2==0){a+=1;} while (n%a!=0){a+=2;} } else{ while (n%a!=0){a+=1;} } b = n/a; c=a.length d=b.length cout << max(c,d) << endl;...
a.cc: In function 'int main()': a.cc:17:9: error: request for member 'length' in 'a', which is of non-class type 'int' 17 | c=a.length | ^~~~~~
s979112687
p03775
C++
#include "stdafx.h" #include <iostream> #include <algorithm> using namespace std; long N; long GetDigit(long num) { return log10(num) + 1; } void solve() { long A = 1; long d = GetDigit(N); for (long i = 0; i < N; i++) { for (long j = 0; j < N; j++) { if (N % A == 0) { d = min(d, GetDigit(N / A)); } ...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s490043626
p03775
C++
#include <bits/stdc++.h> using namespace std; #define ALL(g) (g).begin(),(g).end() #define REP(i, x, n) for(int i = (int) x; i < (int)n; i++) #define rep(i,n) REP(i,0,n) #define RREP(i, x, n) for(int i = (int) n; i > (int)x; i--) #define rrep(i,n) RREP(i,0,n) #define F(i,j,k) fill(i[0],i[0]+j*j,k) #define P(p) cout<<...
a.cc: In function 'int main()': a.cc:35:25: error: 'i' was not declared in this scope 35 | int a=log10(n/i)+1; | ^
s183194904
p03775
C++
#include "stdafx.h" #include <iostream> #include <algorithm> using namespace std; long N; long GetDigit(long num) { return log10(num) + 1; } void solve() { long A = 1; for (long i = 0; i < N; i++) { for (long j = 0; j < N; j++) { if (N % A == 0) { long d = min(d, GetDigit(N / A)); } } } cout << d ...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s465392918
p03775
C++
#include <iostream> #include <vector> #include <cmath> using namespace std; int main() { long long N; cin >> N; vector<long long> v; v.push_back(1LL); long long a = sqrt(N); long long i = 2, j = 1, t; int n; while (i < a) { if (0LL == N % i) { N /= i; n = v.size(); t = pow(...
a.cc: In function 'int main()': a.cc:39:11: error: expected primary-expression before '>' token 39 | if (k=>a && b > v[k]) | ^
s051836114
p03775
C++
#include <iostream> #include <vector> #include <cmath> using namespace std; int main() { long long N; cin >> N; vector<long long> v; v.push_back(1LL); long long a = sqrt(N); long long i = 2, j = 1, t; int n; while (i < a) { if (0LL == N % i) { N /= i; n = v.size(); t = pow(...
a.cc: In function 'int main()': a.cc:39:11: error: expected primary-expression before '>' token 39 | if (k=>a && b > v[k]) | ^
s188533205
p03775
C++
#include <iostream> #include <vector> #include <math> using namespace std; int main() { long long N; cin >> N; vector<long long> v; v.push_back(1LL); long long a = sqrt(N); long long i = 2, j = 1, t; int n; while (i < a) { if (0LL == N % i) { N /= i; n = v.size(); t = pow(i...
a.cc:3:10: fatal error: math: No such file or directory 3 | #include <math> | ^~~~~~ compilation terminated.
s675787364
p03775
C++
#include <iostream> #include <vector> using namespace std; int main() { long long N; cin >> N; vector<long long> v; v.push_back(1LL); long long a = sqrt(N); long long i = 2, j = 1, t; int n; while (i < a) { if (0LL == N % i) { N /= i; n = v.size(); t = pow(i, j); for ...
a.cc: In function 'int main()': a.cc:11:17: error: 'sqrt' was not declared in this scope 11 | long long a = sqrt(N); | ^~~~ a.cc:20:11: error: 'pow' was not declared in this scope 20 | t = pow(i, j); | ^~~ a.cc:38:11: error: expected primary-expression before '>' toke...
s866417877
p03775
C++
#include<cstdio> #include<algorithm> using namespace std; typedef long long int lli; lli N, ans = 9999999999, ou1, ou2, ou, rN; lli keta(lli in); int main(){ scanf("%lld", &N); rN = sqrt(N); for(int l = 1; l <= rN; l++){ if((N % l) == 0){ ou1=keta(l); ou2 = keta(N/l); ou = max(ou1, ou2...
a.cc: In function 'int main()': a.cc:14:8: error: 'sqrt' was not declared in this scope 14 | rN = sqrt(N); | ^~~~
s891960300
p03775
C++
#include <cstdio> #include <cmath> #include <random> #define REP(i,n) for (int i=0;i<(n);i++) int F(double,double); int main(){ long long N; scanf("%lld",&N); int num=1145141919; for(int i=1;i<=100000;i++){ if(N%i==0 && num>F(N/i,i)){ num=F(N/i,i); } } printf("%d",num); return 0; }
/usr/bin/ld: /tmp/ccxgFMdF.o: in function `main': a.cc:(.text+0x80): undefined reference to `F(double, double)' /usr/bin/ld: a.cc:(.text+0xc9): undefined reference to `F(double, double)' collect2: error: ld returned 1 exit status
s882759270
p03775
C++
#include <cstdio> #include <math.h> #include <algorithm> #include <vector> #include <iostream> #include <sstream> #include <string> #include <iomanip> #include <set> #include <map> using namespace std; #define EPS 1e-14 #define FOR(i,a,b) for (int i=(a);i<(b);i++) #define REP(i,n) FOR(i, 0, n) #define PI 2*acos(0.0) ...
a.cc: In function 'int main()': a.cc:34:19: error: 'INT_MAX' was not declared in this scope 34 | int min = INT_MAX; | ^~~~~~~ a.cc:11:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 10 | #include <map> +++ |+#include <c...
s966099233
p03775
C++
#include <iostream> #include <sstream> #include <algorithm> #include <cmath> using namespace std; int main(void) { __int64 N; cin >> N; int a, b; for (__int64 i = 1; i < sqrt(N) + 1; ++i) { if (N % i == 0) { a = i; b = N / i; } } stringstream ss1; ss1 << a; stringstream ss2; ss2 << b; cout << m...
a.cc: In function 'int main()': a.cc:9:9: error: '__int64' was not declared in this scope; did you mean '__ynf64'? 9 | __int64 N; | ^~~~~~~ | __ynf64 a.cc:10:16: error: 'N' was not declared in this scope 10 | cin >> N; | ^ a.cc:14:21: error: expect...
s372679318
p03775
C++
#include <iostream> #include <sstream> #include <algorithm> using namespace std; int main(void) { __int64 N; cin >> N; int a, b; for (__int64 i = 1; i < sqrt(N) + 1; ++i) { if (N % i == 0) { a = i; b = N / i; } } stringstream ss1; ss1 << a; stringstream ss2; ss2 << b; cout << max(ss1.str().leng...
a.cc: In function 'int main()': a.cc:8:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'? 8 | __int64 N; | ^~~~~~~ | __int64_t a.cc:9:16: error: 'N' was not declared in this scope 9 | cin >> N; | ^ a.cc:13:21: error: exp...
s673900080
p03775
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vint; typedef pair<int,int> pint; typedef vector<pint> vpint; #define rep(i,n) for(int i=0;i<(n);i++) #define REP(i,n) for(int i=n-1;i>=(0);i--) #define reps(i,f,n) for(int i=(f);i<(n);i++) #define each(it,v) for(__typeof((v).begin(...
a.cc: In function 'int main()': a.cc:43:20: error: 'prime_factor_decomp_fast' was not declared in this scope; did you mean 'prime_factor_decomp'? 43 | auto ret = prime_factor_decomp_fast(n); | ^~~~~~~~~~~~~~~~~~~~~~~~ | prime_factor_decomp a.cc:58:24: error: ...
s374155015
p03775
C++
#include<cstdio> #include<conio.h> #include<math.h> #include<algorithm> using namespace std; int main(){ long long int n,x,y,i; scanf("%lld",&n); for(i=sqrt(n);i>0;i--){ if(n%i==0) break; } x=i; y=n/x; i=0; while(x!=0){ x=x/10; i++; } x=i; i=0; while...
a.cc:2:9: fatal error: conio.h: No such file or directory 2 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s091842573
p03775
C++
#include <iostream> #include <cstdio> #include <map> #include <set> #include <vector> #include <queue> #include <stack> #include <cmath> #include <algorithm> #include <cstring> #include <string> using namespace std; #define INF 0x3f3f3f3f typedef long long LL; double PI=acos(-1); LL n; int f(LL s) { int i=0; ...
a.cc: In function 'int main()': a.cc:34:9: error: 'ss' was not declared in this scope; did you mean 's'? 34 | ss=s; | ^~ | s
s620017524
p03775
C++
//#include <bits/stdc++.h> #include <iostream> #include <string> #include <sstream> #include <vector> #include <algorithm> #include <map> #include <set> #include <math.h> #include <unordered_map> #include <queue> #include <stack> #include <iomanip> using namespace std; #define PI 3.14159265358979323846264338327950288...
a.cc: In function 'int main()': a.cc:55:18: error: 'INT_MAX' was not declared in this scope 55 | int mn = INT_MAX; | ^~~~~~~ a.cc:14:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 13 | #include <iomanip> +++ |+#include ...
s232053904
p03775
C
#include<stdio.h> int degits(long long a){ if(a<10) return 1; return 1+degits(a/10); } int F(long long a,long long b){ int ad,bd; ad=degits(a); bd=degits(b); return ((ad>bd)?ad:bd); } int main(int argc, char const *argv[]){ long long n,i; int min; scanf("%lld",&n); min=degits(n); for(i=2;i*i<=n;i++){ if...
main.c: In function 'main': main.c:25:25: error: expected ';' before 'return' 25 | printf("%d",min) | ^ | ; 26 | return 0; | ~~~~~~
s316231532
p03775
C
#include<stdio.h> int degits(long long a){ if(a<10) return 1; return 1+degit(a/10); } int F(long long a,long long b){ int ad,bd; ad=degits(a); bd=degits(b); return ((ad>bd)?ad:bd); } int main(int argc, char const *argv[]){ long long n,i; int min; scanf("%lld",&n); min=degit(n); for(i=2;i*i<=n;i++){ if(n...
main.c: In function 'degits': main.c:5:18: error: implicit declaration of function 'degit'; did you mean 'degits'? [-Wimplicit-function-declaration] 5 | return 1+degit(a/10); | ^~~~~ | degits main.c: In function 'main': main.c:25:25: error: expected ';' before '...
s998461728
p03775
C++
#include <iostream> #include <algorithm> using namespace std; typedef long long ll; int digit(ll x) { int c = 0; while (x >= 1) { x /= 10; c++; } return c; } int main() { ll n; int ans; cin >> n; for (int i = 1; pow(i,2) <= n; i++) { if (n%i == 0)ans = digit(max(n/i,(ll)i)); } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:19:25: error: 'pow' was not declared in this scope 19 | for (int i = 1; pow(i,2) <= n; i++) { | ^~~
s490128117
p03775
C++
#include <iostream> #include <algorithm> using namespace std; typedef long long ll; int digit(ll x) { int c = 0; while (x >= 1) { x /= 10; c++; } return c; } int main() { ll n; int ans; cin >> n; for (int i = 1; pow(i,2) <= n; i++) { if (n%i == 0)ans = digit(max(n/i,(ll)i)); } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:19:25: error: 'pow' was not declared in this scope 19 | for (int i = 1; pow(i,2) <= n; i++) { | ^~~
s395210840
p03775
C++
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <map> #include <unordered_map> #include <set> #include <climits> using namespace std; vector<long long> divisor(long long n) { vector<long long> res; for (long long i = 1; i * i <= n; i++) { if (n % i == 0) { ...
a.cc: In function 'int main()': a.cc:31:37: error: 'log10' was not declared in this scope 31 | int tmp1 = static_cast<int>(log10(d)+1); | ^~~~~
s497812275
p03775
C++
#include <iostream> #include <string> #include <list> #include <vector> #include <queue> #include <algorithm> #include <climits> #include <cstring> #define int long long #define uint unsigned long long #define CONTAINS(v,n) (find((v).begin(), (v).end(), (n)) != (v).end()) #define SORT(v) sort((v).begin(), (v).end()) #d...
a.cc: In function 'int main()': a.cc:25:35: error: 'sqrt' was not declared in this scope 25 | for (int i = 1; i <= (int)sqrt(N); i++) | ^~~~
s536280413
p03775
Java
public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long N = sc.nextLong(); long ans = 100; for(long i=1; i*i<=N; i++) { if(N%i==0) { ans = Math.min(ans, getDigits(N/i)); } } System.out.println(ans); sc.close(); } static int getDigits(long...
Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s332843360
p03775
C++
#if 1 #include <iostream> #include <fstream> #include <string> #include <vector> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <queue> #include <stack> #include <array> #include <deque> #include <algorithm> #include <utility> #include <cstdint> #include <functional> #include ...
a.cc: In function 'int main()': a.cc:35:40: error: 'sqrt' is not a member of 'std'; did you mean 'sort'? 35 | for (int64_t i = 1, end = std::sqrt(N)+1; i <= end; i++) | ^~~~ | sort
s562615545
p03776
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; using long long = ll; #define rep(i, n) for (int i=0; i<(int)(n); i++) ll comb(ll n, ll r){ ll x = 1, y= 1; rep(i,r){ x *= n - i; y *= r - i; } cout << x/y; } int main(){ double N, A, B; cin >> N >> A >> B; vector<ll...
a.cc:5:7: error: expected nested-name-specifier before 'long' 5 | using long long = ll; | ^~~~ a.cc:8:1: error: 'll' does not name a type 8 | ll comb(ll n, ll r){ | ^~ a.cc: In function 'int main()': a.cc:20:10: error: 'll' was not declared in this scope 20 | vector<ll> v(N); | ...
s172319090
p03776
Java
package contest; import java.util.*; import java.io.*; public class A { static class Reader { final private int BUFFER_SIZE = 1 << 16; private DataInputStream din; private byte[] buffer; private int bufferPointer, bytesRead; public Reader() { din = new DataInputStream(S...
Main.java:4: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error