submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s667147866
p03775
C++
#include <bits/stdc++.h> using namespace std; int GetDigit(int num){ int digit=0; while(num!=0){ num /= 10; digit++; } return digit; } int F(int a, int b){ int M = max(a, b); return GetDigit(M); } int main() { int n; cin >> n; int count = 100000000000; double m = sqrt(n) ...
a.cc: In function 'int main()': a.cc:20:15: warning: overflow in conversion from 'long int' to 'int' changes value from '100000000000' to '1215752192' [-Woverflow] 20 | int count = 100000000000; | ^~~~~~~~~~~~ a.cc:22:3: error: expected ',' or ';' before 'for' 22 | for(int i = 1; i <= m; i...
s403885108
p03775
Java
import java.util.*; public class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); long N = sc.nextLong(); int ans = keta(N); for(long i = 1;i < N / i;i++){ if(N % i == 0){ ans = Math.min(ans,keta(Math.max(N / i,i)); } } System.out.println(ans); } public static ...
Main.java:9: error: ')' or ',' expected ans = Math.min(ans,keta(Math.max(N / i,i)); ^ 1 error
s076178961
p03775
C++
#include<iostream> #include<vector> using namespace std; int digit(int n) { int num = 1, x = 10; while (true) { if (n >= x / 10 && x < N) { break; } num++; x *= 10; } return num; } int main() { int N; cin >> N; int ans = 10000; for (int i = 1; i <= N / 2; i++) { if (N%i != 0)continue; int tmp ...
a.cc: In function 'int digit(int)': a.cc:9:40: error: 'N' was not declared in this scope 9 | if (n >= x / 10 && x < N) { | ^
s750661852
p03775
C++
#include <bits/stdc++.h> using namespace std; int dd (int I){ int d = 0; while(I>0){ I/=10; d+=1; } return d; } int main(){ int N; cin >> N; int count = 10000000000; for(int i = 1; i*i < N+1; i++){ int c = 10000000000; if(N%i == 0){ int l = dd(i); int m = dd(N/i); ...
a.cc: In function 'int main()': a.cc:17:15: warning: overflow in conversion from 'long int' to 'int' changes value from '10000000000' to '1410065408' [-Woverflow] 17 | int count = 10000000000; | ^~~~~~~~~~~ a.cc:19:13: warning: overflow in conversion from 'long int' to 'int' changes value from ...
s310451546
p03775
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int ans = min(N); for(int i=1; i*i<=N; i++){ if(N%i!=0)continue; int b = N/i; int temp = min(Math.max(i, b)); if(temp<ans){ ans=temp; ...
Main.java:6: error: non-static method min(int) cannot be referenced from a static context int ans = min(N); ^ Main.java:10: error: non-static method min(int) cannot be referenced from a static context int temp = min(Math.max(i, b)); ^ 2 errors
s945160037
p03775
Java
import java.uti.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int ans = min(N); for(int i=1; i*i<=N; i++){ if(N%i!=0)continue; int b = N/i; int temp = min(Math.max(i, b)); if(temp<ans){ ans=temp; ...
Main.java:1: error: package java.uti does not exist import java.uti.*; ^ Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol:...
s740650358
p03775
Java
import java.uti.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int ans = min(N); for(int i=1; i*i<=N; i++){ if(N%i!=0)continue; int b = N/i; int temp = min(Math.max(i, b)); if(temp<ans){ ans=temp; ...
Main.java:20: error: reached end of file while parsing } ^ 1 error
s781343436
p03775
C++
#include<iostream> #include<cmath> using namespace std; int getDigit10(ll i){ int cnt = 0; while(i > 0){i/=10;++cnt;} return cnt; } int main(){ ll N;cin >> N; int ans = getDigit10(N); for(int i = 1;i < int(sqrt(N));++i){ if(N%i != 0)continue; ll j = N / i; if(ans > getD...
a.cc:5:16: error: 'll' was not declared in this scope 5 | int getDigit10(ll i){ | ^~ a.cc: In function 'int main()': a.cc:12:5: error: 'll' was not declared in this scope 12 | ll N;cin >> N; | ^~ a.cc:12:17: error: 'N' was not declared in this scope 12 | ll N;cin >> N; ...
s916545765
p03775
C++
#include<iostream> using namespace std; int digit_number(int a){ int res=0; while(a>0){ a/=10; res++;} return res; } int main(){ int N; cin>>N; double B[N]; int A[N]; int min=13; for(int i=1;i<N/2;i++){ B[i]=N/i; A[i]=i; if(B!=(int)B){ B=10000000000; } } for(int i=1;i<N/2...
a.cc: In function 'int main()': a.cc:19:11: error: cast from 'double*' to 'int' loses precision [-fpermissive] 19 | if(B!=(int)B){ | ^~~~~~ a.cc:19:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 19 | if(B!=(int)B){ | ~^~~~~~~~ a.cc:20:8: error:...
s686237286
p03775
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; ll digit(ll a) { ll ans = 1; while (a < 10) { a /= 10; ans++; } return ans; } int main() { ll N; cin >> N; ll rN = sqrt(N); ll res = 0; ll anotherres = 0; for(ll i = rN; i >= 0; i--) { if (N % i == 0) res = i; anotherre...
a.cc: In function 'int main()': a.cc:22:3: error: 'ans' was not declared in this scope; did you mean 'abs'? 22 | ans = digit(max(res,anotherres)); | ^~~ | abs
s930489273
p03775
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; ll digit(ll a) { ll ans = 1; while (a < 10) { a /= 10; ans++; } return ans; } int main() { ll N; cin >> N; ll rN = sqrt(N); ll res = 0; ll anotherres = 0; for(ll i = rN; i >= 0; i--) { if (N % i == 0) ans = i; anotheran...
a.cc: In function 'int main()': a.cc:20:21: error: 'ans' was not declared in this scope; did you mean 'abs'? 20 | if (N % i == 0) ans = i; anotherans = N / i; | ^~~ | abs a.cc:20:30: error: 'anotherans' was not declared in this scope; did you mean 'anotherres'?...
s176494253
p03775
C++
#include <math.h> #include <iostream> #include<string> #include <algorithm> #include <bits/stdc++.h> #include <vector> #include <stdlib.h> using namespace std; int main() { double N; cin >> N; int a=0; int j=0; int ans=11; for(int i=1;i<sqrt(N)+1;i++) { a=0; if(N%i==0) { j=max(N/i,i); while(j>0){j/=10;a++;} ans=min(a,...
a.cc: In function 'int main()': a.cc:20:5: error: invalid operands of types 'double' and 'int' to binary 'operator%' 20 | if(N%i==0) | ~^~ | | | | | int | double a.cc:22:6: error: no matching function for call to 'max(double, int&)' 22 | j=max(N/i,i); | ~~~^~~~~~~ In fi...
s613103765
p03775
C++
//#define _GLIBCXX_DEBUG #include<bits/stdc++.h> #define PI 3.14159265359 using namespace std; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) const int INF= 1e9+5; typedef long long ll; typedef vector<ll> vl; typedef vector<vector<ll> >vvl; typedef pair<ll,ll> P; typedef tuple<ll,ll,ll> T; const ll MOD=1000000007L...
a.cc: In function 'int main()': a.cc:33:12: error: no matching function for call to 'min(ll&, const long unsigned int&)' 33 | MIN=min(MIN,max(s.size(),t.size())); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linu...
s260593672
p03775
C++
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <numeric> #include <map> #include <cmath> #include <math.h> #include <cstdio> #include <iomanip> typedef long long ll; using namespace std; bool is_prime(long long N) { if (N == 1) return false; for (long long i = 2; i * i <= N; +...
a.cc: In function 'int main()': a.cc:57:19: error: 'INT_MAX' was not declared in this scope 57 | int ans = INT_MAX; | ^~~~~~~ a.cc:11:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 10 | #include <iomanip> +++ |+#includ...
s160444027
p03775
C
#include <stdio.h> #include <math.h> int main(void) { char arr[100]; unsigned long long int n; fgets(arr, sizeof(arr), stdin); sscanf(arr, "%lld", &n); unsigned long long int ans = n; int a; for (a=1; a*a <= n; a++) { if (n % a != 0) { continue; } unsigned long long int b = n/a; ...
main.c: In function 'main': main.c:23:7: error: 'r' undeclared (first use in this function) 23 | r = a; | ^ main.c:23:7: note: each undeclared identifier is reported only once for each function it appears in
s778516425
p03775
C++
#include <iostream> using namespace std; int CDigit(int x){ int i=1; while(x/10){ x = x/10; i++; } return i; } int main (){ int N,m=1; cin >> N; for(int i=1;i<(int)pow(N,0.5);i++){ if(N%i == 0)m = i; } cout << CDigit(m); }
a.cc: In function 'int main()': a.cc:14:22: error: 'pow' was not declared in this scope 14 | for(int i=1;i<(int)pow(N,0.5);i++){ | ^~~
s948288640
p03775
C++
//057 C - Digits in Multiplication 2017/03/26 #include <bits/stdc++.h> #define rep(i ,n) for(int i=0;i<(int)(n);++i) using namespace std; typedef long long int int64; typedef unsigned long long uint64; int f(uint64 a , uint64 b){ int a1=0; int b1=0; do{ ++a1; a/=10; } while(a!=0); d...
a.cc: In function 'int main()': a.cc:28:15: error: 'i' was not declared in this scope 28 | if( n%i == 0 ) { | ^
s131930536
p03775
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); ++i) #define all(v) (v).begin(),(v).end() using namespace std; using ll = long long; using P = pair<int,int>; using G = vector<vector<int>>; nt calc_digit(long long n) { int res = 0; while (n > 0) { ++res; n /= 10; } ret...
a.cc:9:1: error: 'nt' does not name a type; did you mean 'int'? 9 | nt calc_digit(long long n) { | ^~ | int a.cc: In function 'int main()': a.cc:20:21: error: 'INF' was not declared in this scope 20 | long long res = INF; | ^~~ a.cc:24:29: error: 'calc_digit' was not dec...
s742565613
p03775
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define FOR(i, s, e) for (long long i = (long long)(s); i <= (long long)(e); i++) #define printYesNo(is_ok) puts(is_ok ? "Yes" : "No"); #define printVector(v) rep(i, v.size()) cout << v[i] << endl; int main() { long lo...
a.cc:23:2: error: stray '#' in program 23 | }#include <bits/stdc++.h> | ^ a.cc:23:3: error: 'include' does not name a type 23 | }#include <bits/stdc++.h> | ^~~~~~~ a.cc:30:5: error: redefinition of 'int main()' 30 | int main() | ^~~~ a.cc:8:5: note: 'int main()' previously defined here...
s486185862
p03775
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll N; cin >> N; ll digit = 1; for (ll i = 2; i <= sqrt(N); i++) { if (N%i == 0) { digit = i; } } cout << to_string(n/digit).length() << endl; return 0; }
a.cc: In function 'int main()': a.cc:15:23: error: 'n' was not declared in this scope 15 | cout << to_string(n/digit).length() << endl; | ^
s879352576
p03775
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); Long a = sc.nextLong(); int b = 0; int c = 1; for(int i=1;i<=Math.sqrt(a);i++){if(a%i==0){c=a/i;} } while(c>0){c/=10; b++...
Main.java:8: error: incompatible types: possible lossy conversion from long to int for(int i=1;i<=Math.sqrt(a);i++){if(a%i==0){c=a/i;} ^ 1 error
s865479130
p03775
C++
#include<iostream> #include<vector> #include<utility> #include<map> #include<deque> #include<numeric> #include<algorithm> #include<unordered_map> using namespace std; using ll = long long int; constexpr int INF = 1 << 29; constexpr ll MOD = ll(1e9 + 7); ll n; vector<ll> d; ll f(ll a, ll b) { return ll(max(log10(a),...
a.cc: In function 'll f(ll, ll)': a.cc:19:23: error: 'log10' was not declared in this scope 19 | return ll(max(log10(a), log10(b))) + 1; | ^~~~~ a.cc: In function 'll divisor(ll)': a.cc:23:21: error: 'log10' was not declared in this scope 23 | ll ret = ll(log10(n)) + 1;...
s761700218
p03775
C++
using namespace std; int main(){ int N; cin >>N; int ketamin=11; for (int i=1;i<N/2+1;i++){ if(N%i==0){ ketamin=min(ketamin,max((int)log10(i)+1,(int)log10(N/i)+1)); } } cout<<ketamin<<endl; return 0; }
a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope 5 | 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 | using namespace std; a.cc:9:36: error: 'log10'...
s461741596
p03775
C++
#include <bits/stdc++.h> using namespace std; int CountOfDigits(int64_t n) { int sum = 0; while (n > 0) { sum ++; n /= 10; } return sum; } int main() { int N; cin >> N; int ans = CountOfDigits(N); for(int64_t i = 1; i*i <= N; i++){ if(N % i! = 0) continue; const int64_t j = N/i; ...
a.cc: In function 'int main()': a.cc:20:13: error: expected ')' before '!' token 20 | if(N % i! = 0) continue; | ~ ^ | )
s406231577
p03775
C++
#include <iostream> #include <algorithm> using namespace std; #define rep(i,n) for (int i=0;i<n;i++) #define REP(i,n) for (int i=1;i<=n;i++) #define print(x) cout << x << endl; typedef long long ll; ll ketasu(ll n) { ll count = 1; while (n >= 10) { n /= 10; count++; } return count; } int main() { ll n, ans;...
a.cc: In function 'int main()': a.cc:21:16: error: 'sqrt' was not declared in this scope 21 | ll m = sqrt(n); | ^~~~
s358704953
p03775
C++
#include <iostream> #include <algorithm> #include <string> #include <math.h> #include <set> #include <vector> #define rep(i,n) for(int i=0; i< (int)(n); ++i) using namespace std; using ll=long long; int cnt_digits(ll n){ int digits = 0; while(n>0){ n/=10; digits ++; } return digits; } int main(){ cin.tie...
a.cc: In function 'int main()': a.cc:31:20: error: 'ans' was not declared in this scope; did you mean 'abs'? 31 | if(ans > cur) ans = cur; | ^~~ | abs a.cc:33:17: error: 'ans' was not declared in this scope; did you mean 'abs'? 33 | cout <<...
s898127714
p03775
C++
#include <bits/stdc++.h> using namespace std; int main () { long N; cin >> N; long A, B, count, sub, ans = 1000; for(int i = 1; i <= squrt(N); i++){ if(N % i == 0){ A = N / i; B = i; sub = 0; count = 0; while(A != 0){ sub++; A /= 10; } while(B != 0){...
a.cc: In function 'int main()': a.cc:7:23: error: 'squrt' was not declared in this scope; did you mean 'sqrt'? 7 | for(int i = 1; i <= squrt(N); i++){ | ^~~~~ | sqrt
s776625631
p03775
Java
import java.util.Scanner; public class Main { static int keta(long n) { int i=0; while(n>0) { i++; n /= 10; } return i; } public static void main(String[] args) throws Exception{ Scanner stdIn = new Scanner(System.in); long N = stdIn.nextLong(); int a=keta(N); for(int i=1; i*i<=N ; i++) { if...
Main.java:21: error: reached end of file while parsing } ^ 1 error
s165543489
p03775
C++
#include <iostream> #include <cmath> #include <stdio.h> using namespace std; using ll = long long int s = 0; int Digits(ll m){ while (m != 0) { m /= 10; s++; } return s; } int main(){ ll n; cin >> n; int a = sqrt(n); while (n%a != 0){ a++; } int k = n...
a.cc:9:4: error: expected ';' before 's' 9 | int s = 0; | ^~ | ; a.cc:10:12: error: 'll' was not declared in this scope 10 | int Digits(ll m){ | ^~ a.cc: In function 'int main()': a.cc:19:5: error: 'll' was not declared in this scope 19 | ll n; | ^~ a.cc:20:12:...
s521591869
p03775
C++
#include<bits/stdc++.h> int main(void){ int best,c,countA,countB,N; cin >> N; for(int i=1;i*i<N;i++){ int A = N/i; int B = i; if(N%A!=0)continue; countA = 0; countB = 0; while(A!=0){ A/=10; countA++; } while(B!=0){ B/=10; countB++; } if(best<cou...
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 /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std:...
s814097757
p03775
C++
#include<bits/stdc++.h> int main(void){ int best,c,countA,countB,N; for(int i=1;i*i<N;i++){ if(N%A!=0)continue; countA = 0; countB = 0; int A = N/i; int B = i; while(A!=0){ A/=10; countA++; } while(B!=0){ B/=10; countB++; } if(best<countA){ best...
a.cc: In function 'int main()': a.cc:6:10: error: 'A' was not declared in this scope 6 | if(N%A!=0)continue; | ^
s337805507
p03775
C++
#include<bits/stdc++.h> int main(void){ int best,c,countA,countB,N; for(int i=1;i*i<N;i++){ countA = 0; countB = 0; int A = N/i; int B = N/A; while(A!=0){ tmp/=10; countA++; } while(B!=0){ tmp/=10; countB++; } if(best<countA){ best = countA; } ...
a.cc: In function 'int main()': a.cc:11:7: error: 'tmp' was not declared in this scope; did you mean 'tm'? 11 | tmp/=10; | ^~~ | tm a.cc:15:7: error: 'tmp' was not declared in this scope; did you mean 'tm'? 15 | tmp/=10; | ^~~ | tm
s204363666
p03775
C++
#include<bits/stdc++.h> int main(void){ int best,c,count,N; for(int i=0;i*i<N;i++){ count = 0; tmp = N/i; while(tmp!=0){ tmp/=10; count++; } if(best<count){ best = count; } } printf("%d",count); return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'tmp' was not declared in this scope; did you mean 'tm'? 7 | tmp = N/i; | ^~~ | tm
s804227532
p03775
C++
#include<bits/stdc++.h> int main(void){ int best,c,count,N; for(int i=0;i<N;i++){ count = 0; tmp = N/i; while(tmp!=0){ tmp/=10; count++; } if(best<count){ best = count; } } printf("%d",count); return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'tmp' was not declared in this scope; did you mean 'tm'? 7 | tmp = N/i; | ^~~ | tm
s380433312
p03775
C++
#include <bits/stdc++.h> using namespace std; int F(int A, int B){ int k, l; k = 0; l = 0; while(A != 0){ A /= 10; k++; } while(B != 0){ B /= 10; l++; } return max(k, l); } int main(){ int64_t N, ans; cin >> N; ans = 10000000; for(int i = 1; i <= s...
a.cc: In function 'int main()': a.cc:29:16: error: no matching function for call to 'min(int&, int64_t&)' 29 | ans = min(a, ans); | ~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s531619508
p03775
C++
//おまじないc++ #include <iostream> #include<cmath> #include<vector> #include <algorithm> #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define all(x) (x).begin(),(x).end() using namespace std; int digit(long int x) { int d = 0; while (x != 0) { x /=10; d++; } return d; } int main() { long int n; cin >> ...
a.cc: In function 'int main()': a.cc:30:28: error: 'max' cannot be used as a function 30 | cout << max({ digit(i), digit(n / i) }); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
s104115413
p03775
C++
//おまじないc++ #include <iostream> #include<cmath> #include<vector> #include <algorithm> #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define all(x) (x).begin(),(x).end() using namespace std; int digit(long int x) { int d = 0; while (x != 0) { x /=10; d++; } return d; } int main() { long int n; cin >> ...
a.cc: In function 'int main()': a.cc:30:28: error: 'max' cannot be used as a function 30 | cout << max(digit(i), digit(n / i)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~
s490507479
p03775
C++
//おまじないc++ #include <iostream> #include<cmath> #include<vector> #include <algorithm> #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define all(x) (x).begin(),(x).end() using namespace std; int digit(long int x) { int d = 0; while (x != 0) { x /= 0; d++; } return d; } int main() { long int n; cin >> ...
a.cc: In function 'int digit(long int)': a.cc:12:19: warning: division by zero [-Wdiv-by-zero] 12 | x /= 0; | ~~^~~~ a.cc: In function 'int main()': a.cc:30:28: error: 'max' cannot be used as a function 30 | cout << max(digit(i), digit(n / i)); | ...
s511831604
p03775
C++
//おまじないc++ #include <iostream> #include<cmath> #include<vector> #include <algorithm> #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define all(x) (x).begin(),(x).end() using namespace std; int digit(long int x) { int d = 0; while (x != 0) { x /= 0; d++; } } int main() { long int n; cin >> n; long ...
a.cc: In function 'int digit(long int)': a.cc:12:19: warning: division by zero [-Wdiv-by-zero] 12 | x /= 0; | ~~^~~~ a.cc:15:1: warning: no return statement in function returning non-void [-Wreturn-type] 15 | } | ^ a.cc: In function 'int main()': a.cc:29:28: error: 'max...
s825908747
p03775
C++
//おまじないc++ #include <iostream> #include<cmath> #include<vector> #include <algorithm> #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define all(x) (x).begin(),(x).end() using namespace std; int digit(long int x) { int d = 0; while (x != 0) { x /= 0; d++; } int main() { long int n; cin >> n; long in...
a.cc: In function 'int digit(long int)': a.cc:12:19: warning: division by zero [-Wdiv-by-zero] 12 | x /= 0; | ~~^~~~ a.cc:16:17: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 16 | int main() { | ^~ a.cc:...
s733799606
p03775
C++
require 'pp' require 'prime' require 'set' N=gets.chomp.split(' ').map{|n| n.to_i}.first # # if Prime.prime?(N) # puts N-1 # exit # end # # a=0 # b=0 # # mini = 1_000_000_000_000_0 # source = Math.sqrt(N).to_i+1 # 1.upto(source) do |n| # next if N%n!=0 # a=n # b=N/n # if ((a-1 + b-1) < mini) # mini = a...
a.cc:1:9: warning: multi-character character constant [-Wmultichar] 1 | require 'pp' | ^~~~ a.cc:2:9: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 2 | require 'prime' | ^~~~~~~ a.cc:3:9: warning: multi-character character constant [-Wmultichar] ...
s578687367
p03775
C
#include<bits/stdc++.h> using namespace std; int main(){ long long n,m; cin >> n; for(int i=1; i <= sqrt(n); i++){ if(n%i==0) m=(long long)log10(n/i)+1; } cout << m; }
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s896483415
p03775
C++
#include<bits/stdc++.h> using namespace std; int main(){ long long n,m; cin >> n; for(int i=1; i <= n/2; i++){ if(n%i==0) m=(lli)log10(m/i)+1; } cout << m; }
a.cc: In function 'int main()': a.cc:7:31: error: 'lli' was not declared in this scope 7 | if(n%i==0) m=(lli)log10(m/i)+1; | ^~~
s310241178
p03775
C++
#include<bits/stdc++.h> using namespace std; using ll = long long; int count(ll n){ int res = 0; while(n>0){ res++; n/=10; } return res; } int main(){ ll N; cin >> N; //1*Nの桁数 int ans = count(N); for (ll A=1LL; A*A<=N; A++)} if(N%A!=0) continue; const int B = N/A; const i...
a.cc: In function 'int main()': a.cc:19:32: error: expected primary-expression before '}' token 19 | for (ll A=1LL; A*A<=N; A++)} | ^ a.cc: At global scope: a.cc:20:7: error: expected unqualified-id before 'if' 20 | if(N%A!=0) continue; | ^~ a.cc:21:21: e...
s615178794
p03775
C++
#include<bits/stdc++.h> using namespace std; int main(){ long long x; long longi=0; cin >> x; while(x!=0){ i++; if(x>=2*i+1)x-=i; else if(x==i)x-=i; } cout << i; }
a.cc: In function 'int main()': a.cc:8:5: error: 'i' was not declared in this scope 8 | i++; | ^ a.cc:12:11: error: 'i' was not declared in this scope 12 | cout << i; | ^
s535155587
p03775
C++
#include<bits/stdc++.h> using namespace std; int keta(int n){ if(n<10)return 1; else if(n<100)return 2; else if(n<1000)return 3; else if(n<10000)return 4; else if(n<100000)return 5; else if(n<1000000)return 6; else return 7; } int main(){ long long n: cin >> n; int sqn = (int)sqrt((double)n) + 1; ...
a.cc: In function 'int main()': a.cc:15:14: error: found ':' in nested-name-specifier, expected '::' 15 | long long n: | ^ | :: a.cc:15:13: error: 'n' has not been declared 15 | long long n: | ^ a.cc:16:7: error: qualified-id in declaration before '>>' t...
s588494215
p03775
C++
#include<bits/stdc++.h> using namespace std; int F(int n1, int n2) { int digit1 = 1, digit2 = 1; while(n1/10) { digit1++; n1 /= 10; } while(n2/10) { digit2++; n2 /= 10; } return max(digit1, digit2); } int main () { int N; cin >> N; for (int i=1;i<(N+1)/2;i++) { if (i==0) { ...
a.cc: In function 'int main()': a.cc:24:7: error: 'ans' was not declared in this scope; did you mean 'abs'? 24 | ans = F(1,N); | ^~~ | abs a.cc:27:7: error: 'ans' was not declared in this scope; did you mean 'abs'? 27 | ans = min(ans,F(i,N/i)); | ^~~ | a...
s211392227
p03775
C++
#include <bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(false); cin.tie(0); #define FOR(i,s,n) for(int i = s; i < (n); i++) #define REP(i,n) FOR(i,0,n) #define ALL(n) (n).begin(), (n).end() #define RALL(n) (n).rbegin(), (n).rend() #define ATYN(n) cout << ( (n) ? "Yes":"No") << endl; #define CFYN(...
a.cc: In function 'int main()': a.cc:22:22: error: no matching function for call to 'min(int&, std::__cxx11::basic_string<char>::size_type)' 22 | ans = min(ans,s.size()); | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include...
s490034132
p03775
C++
#include <bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(false); cin.tie(0); #define FOR(i,s,n) for(int i = s; i < (n); i++) #define REP(i,n) FOR(i,0,n) #define ALL(n) (n).begin(), (n).end() #define RALL(n) (n).rbegin(), (n).rend() #define ATYN(n) cout << ( (n) ? "Yes":"No") << endl; #define CFYN(...
a.cc: In function 'int main()': a.cc:21:37: error: no matching function for call to 'max(ll, int&)' 21 | string s = to_string(max(n/i,i)); | ~~~^~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14...
s179185625
p03775
Java
import java.io.PrintWriter; import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); PrintWriter out = new PrintWriter(System.out); int N = Integer.parseInt(sc.next()); int M = (int) Math.sqrt(N); int tmp=1; for(in i=1;i<M;i++){ if(N%i==0){...
Main.java:13: error: cannot find symbol for(in i=1;i<M;i++){ ^ symbol: class in location: class Main 1 error
s797621345
p03775
Java
public class Main { public static void main(String[] args) { try (Scanner sc = new Scanner(System.in)) { System.out.println(minF(sc.nextInt())); } } public static int minF(int n) { int balance = 1; int restMulti = 1; List<Integer> prime = new ArrayList<...
Main.java:4: error: cannot find symbol try (Scanner sc = new Scanner(System.in)) { ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol try (Scanner sc = new Scanner(System.in)) { ^ symbol: class Scanner location: clas...
s601848365
p03775
C++
#include <iostream> #include <string> #include <stack> #include <queue> #include <vector> #include <list> #include <set> #include <map> #include <algorithm> #include <cstdio> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define repc(i, s, n) for (int i = (s); i <= (n); i++) #define rrep(i, n) ...
a.cc: In function 'int main()': a.cc:32:22: error: 'log10' was not declared in this scope 32 | cout << (int)log10(div) + 1 << endl; | ^~~~~
s329382652
p03775
C++
import sys input = sys.stdin.readline def make_divisors(n): divisors = [] for i in range(1, int(n**0.5) + 1): if n % i == 0: divisors.append(i) if i != n // i: divisors.append(n//i) return divisors def main(): N = int(input()) a = make_divisors(N) ...
a.cc:23:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 23 | if __name__ == '__main__': | ^~~~~~~~~~ a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s046377782
p03775
C++
#include <iostream> #include <algorithm> using namespace std; int main(void){ long n; int a,s=0; cin >> n; a=(int)sqrt(n); while (n%a!=0) a--; n/=a; while (n>0){ s++; n/=10; } cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:10: error: 'sqrt' was not declared in this scope 8 | a=(int)sqrt(n); | ^~~~
s216316485
p03775
C++
#include <iostream> #include <algorithm> using namespace std; int main(void){ long n int a,s=0; cin >> n; a=(int)sqrt(n); while (n%a!=0) a--; n/=a; while (n>0){ s++; n/=10; } cout << s << endl; return 0; }
a.cc: In function 'int main()': a.cc:6:3: error: expected initializer before 'int' 6 | int a,s=0; | ^~~ a.cc:7:10: error: 'n' was not declared in this scope 7 | cin >> n; | ^ a.cc:8:3: error: 'a' was not declared in this scope 8 | a=(int)sqrt(n); | ^ a.cc:8:10: error: 's...
s792798896
p03775
C++
#include <bits/stdc++.h> #define int long long using namespace std; signed main() { int n; cin >> n; for(int i = sqrt(n); ; i--) { if(n % i == 0) { cout << int(log10(n / i)) + 1 << endl; return 0; } } }
a.cc: In function 'int main()': a.cc:2:13: error: expected primary-expression before 'long' 2 | #define int long long | ^~~~ a.cc:10:15: note: in expansion of macro 'int' 10 | cout << int(log10(n / i)) + 1 << endl; | ^~~
s786058086
p03775
C++
#include <bits/stdc++.h> #include <algorithm> using namespace std; int main(){ double a; cin >> a; double b,c; a =b*c; double d == 10000000; for (int i= double ceil(double sqrt(double a)) ;i>=1;i--){ if(a%i == 0 && a/i%i == 0){ d = min(d,abs(i-a/i)); ...
a.cc: In function 'int main()': a.cc:13:11: error: expected initializer before '==' token 13 | double d == 10000000; | ^~ a.cc:14:17: error: expected primary-expression before 'double' 14 | for (int i= double ceil(double sqrt(double a)) ;i>=1;i--){ | ^~~~~~ a.cc:16:14: e...
s399493190
p03775
C++
#include <iostream> #include <vector> using namespace std; int GetDigit(long long int num){ int digit=0; while(num!=0){ num /= 10; digit++; } return digit; } int main() { long long int N; cin >> N; int a = 1; for(long long int i=2; i*i<=N; i++){ ...
a.cc:32:2: error: expected class-name at end of input 32 | ~ | ^
s897590058
p03775
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll inf = 1e18L + 5; ll dig(ll x) { ll cnt = 0; while (x) { cnt++; x /= 10; } return cnt; } fnc(ll N) { ll ans = inf; for (ll i = 1; i <= sqrt(N); i++) { if (N % i == 0) { ll a = i; ...
a.cc:18:1: error: ISO C++ forbids declaration of 'fnc' with no type [-fpermissive] 18 | fnc(ll N) | ^~~
s817850415
p03775
C++
<iostream>
a.cc:1:1: error: expected unqualified-id before '<' token 1 | <iostream> | ^
s159480455
p03775
C++
#include<bits/stdc++.h> using namespace std; #define rep(i, n) for(int i = 0; i < (n); i++) int int_len(int n) { int s=0; while(n!=0) s++, n/=10; return s; } int int_sum(long long int n) { int m=0,s=0,a=n; while(a!=0) s++, a/=10; for(int i=s-1;i>=0;i--) m+=n/((int)pow(10,i))-(n/((int)pow(10,i+1)))*10; r...
a.cc: In function 'int main()': a.cc:31:14: error: no matching function for call to 'min(long long int&, const int&)' 31 | ans=min(ans,max(int_sum(i),int_sum(n/i))); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/includ...
s716887511
p03775
C++
#include<bits/stdc++.h> using namespace std; #define rep(i, n) for(int i = 0; i < (n); i++) int int_len(int n) { int s=0; while(n!=0) s++, n/=10; return s; } int int_sum(int n) { int m=0,s=0,a=n; while(a!=0) s++, a/=10; for(int i=s-1;i>=0;i--) m+=n/((int)pow(10,i))-(n/((int)pow(10,i+1)))*10; return m; }...
a.cc: In function 'int main()': a.cc:31:14: error: no matching function for call to 'min(long long int&, const int&)' 31 | ans=min(ans,max(int_sum(i),int_sum(n/i))); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/includ...
s201923177
p03775
C++
#include<bits/stdc++.h> using namespace std; #define rep(i, n) for(int i = 0; i < (n); i++) int int_len(int n) { int s=0; while(n!=0) s++, n/=10; return s; } int int_sum(int n) { int m=0,s=0,a=n; while(a!=0) s++, a/=10; for(int i=s-1;i>=0;i--) m+=n/((int)pow(10,i))-(n/((int)pow(10,i+1)))*10; return m; }...
a.cc: In function 'int main()': a.cc:31:22: error: no matching function for call to 'max(int&, long long int)' 31 | ans=min(ans,max(i,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, ...
s890137097
p03775
Java
#include<iostream> #include <math.h> using namespace std; int main(){ long long n; cin >> n; int ans = 10; for(long long i=1; i<=sqrt(n); i++){ long long j = n / i; if(n == i*j){ int f = max((int)log10(i)+1, (int)log10(j)+1); ans = min(ans, f); } } ...
Main.java:1: error: illegal character: '#' #include<iostream> ^ Main.java:2: error: illegal character: '#' #include <math.h> ^ Main.java:5: error: not a statement long long n; ^ Main.java:6: error: not a statement cin >> n; ^ Main.java:9: error: not a statement for(long long i=1; i<=sqrt(n); i++...
s319073202
p03775
C++
#include <bits/stdc++.h> using namespace std; int func(long long n) { int digits = 0; while(n > 0) { n /= 10; digits++; } return digits; } int main(void) { long long i,j; long long n; cin >> n; long long ans = (1<<29); for (i = 1; i*i <= n; i++) { if (n % i == 0) { j = n /i; ans = min(ans, func(j...
a.cc: In function 'int main()': a.cc:21:34: error: no matching function for call to 'min(long long int&, int)' 21 | ans = min(ans, func(j)); | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_6...
s710766949
p03775
C++
#include <bits/stdc++.h> #define int long long #define rep(i,n) for(int i=0;i<n;++i) #define rep1(i,n) for(int i=1;i<=n;++i) #define all(a) a.begin(),a.end() #define P pair<long long,long long> #define double long double using namespace std; //桁 int kt(int a){ double b=a; b=log10(b); int c=b; return c+1; } int...
a.cc: In function 'int main()': a.cc:62:37: error: no matching function for call to 'min(long long int&, <unresolved overloaded function type>)' 62 | answer = min(answer,count); | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, ...
s061324984
p03775
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<cmath> #include<cstdlib> #include<tuple> #define int long long using namespace std; int kt(int a){ double b=a; b=log10(b); int c=b; return c+1; } signed main() { int N; cin >> N; int answer = 100; for(int i = 1;i * i <= N...
a.cc: In function 'int main()': a.cc:26:37: error: no matching function for call to 'min(long long int&, <unresolved overloaded function type>)' 26 | answer = min(answer,count); | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, ...
s001670877
p03775
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<cmath> #include<cstdlib> #include<tuple> #define int long long using namespace std; int kt(int a){ double b=a; b=log10(b); int c=b; return c+1; } signed main() { int N; cin >> N; int answer = 100; for(int i = 1;i * i <= N...
a.cc: In function 'int main()': a.cc:25:37: error: no matching function for call to 'min(long long int&, <unresolved overloaded function type>)' 25 | answer = min(answer,count); | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, ...
s418809423
p03775
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<cmath> #include<cstdlib> #include<tuple> #define int long long using namespace std; int kt(int a){ double b=a; b=log10(b); int c=b; return c+1; } signed main() { int N; cin >> N; int answer = 100; for(int i = 1;i * i <= N...
a.cc: In function 'int main()': a.cc:23:39: error: 'a' was not declared in this scope 23 | int count =kt(a); | ^ a.cc:25:37: error: no matching function for call to 'min(long long int&, <unresolved overloaded function type>)' 25 | ...
s595655623
p03775
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<cmath> #include<cstdlib> #include<tuple> #define int long long using namespace std; signed main() { int N; cin >> N; int answer = 100; for(int i = 1;i * i <= N;i++) { if(N % i == 0) { int A = N / i; int count =kt(a); ...
a.cc: In function 'int main()': a.cc:18:39: error: 'a' was not declared in this scope 18 | int count =kt(a); | ^ a.cc:18:36: error: 'kt' was not declared in this scope 18 | int count =kt(a); | ...
s009750271
p03775
C++
#include <iostream> #include <string> #include <cstdlib> #include <vector> #include <array> #include <map> #include <set> #include <algorithm> #include <queue> #include <stack> #include <cmath> #include <climits> #include <cstdio> #include <iomanip> #include <utility> using namespace std; typedef long long int ll; ve...
/usr/bin/ld: /tmp/ccxC9mx9.o: in function `main': a.cc:(.text+0x79): undefined reference to `divisor(long long)' collect2: error: ld returned 1 exit status
s013956376
p03775
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n; cin>>n; int mn=10; for (ll i=1;i*i<=n;i++) if (n%i==0) mn=min(mn,max(to_string(i).size(),to_string(n/i).size())); cout<<mn<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:19: error: no matching function for call to 'min(int&, const long unsigned int&)' 11 | mn=min(mn,max(to_string(i).size(),to_string(n/i).size())); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14...
s948853569
p03775
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n; cin>>n; int mn=10; for (ll i=1;i*i<=n;i++) if (n%i==0) mn=min(mn,max(to_string(i).size(),to_string(n/i).size())) cout<<mn<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:19: error: no matching function for call to 'min(int&, const long unsigned int&)' 11 | mn=min(mn,max(to_string(i).size(),to_string(n/i).size())) | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/...
s567641283
p03775
C++
# include <bits/stdc++.h> # define rep(i, n) for(int i=0, i##_len=(n); i<i##_len; ++i) # define reps(i, n) for(int i=1, i##_len=(n); i<=i##_len; ++i) # define rrep(i, n) for(int i=((int)(n)-1); i>=0; --i) # define rreps(i, n) for(int i=((int)(n)); i>0; --i) # define ALL(x) (x).begin(), (x).end() # define SZ(x) ((int)(x...
a.cc: In function 'int main()': a.cc:40:31: error: expected ')' before ';' token 40 | keta = countDigit(max(a,b); | ~ ^ | )
s894981945
p03775
C++
#include<bits/stdc++.h> using namespace std; long long n,a,b,i,j,ans,m; int main() { cin>>n; for(i=1;i*i<=n;i++) { if(n%i!=0) {continue;} a=i; b=n/i; m=max(a,b); j=0; while(m!=0){ m=m/10; j++;} m=j;}cout<<m return 0; }
a.cc: In function 'int main()': a.cc:16:13: error: expected ';' before 'return' 16 | m=j;}cout<<m | ^ | ; 17 | return 0; | ~~~~~~
s189418478
p03775
C++
#include <isotream> #icnlude <cmath> using namespace std; int main(){ unsigned long long int l; cin >> l; unsigned long long int a = sqrt(l); int tmp = 1000; for(long long int i = 1; i <= a; i++){ if(a % i != 0) continue; unsigned long long int b = a / i; int p = log10(i), q = log10(b); p++,...
a.cc:1:10: fatal error: isotream: No such file or directory 1 | #include <isotream> | ^~~~~~~~~~ compilation terminated.
s372789374
p03775
C++
#include<bits/stdc++.h> using namespace std; int main(){ int N;//Nの素因数を求めてから、そのかけ合わせでできるうちのFの最小値を求める cin>>N; vector<pair<int,int>> F; int c=0; /*if(N==1) { cout<< 1 << endl; return 0; } */ for(int i=1;i<sqrt(N);i++){ if(N%i==0) { F[i].first=i; ...
a.cc: In function 'int main()': a.cc:30:2: error: expected '}' at end of input 30 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s829529589
p03775
C
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #define ll long long #define rep(i,l,r) for(ll i=(l);i<(r);i++) #define max(p,q) ((p)>(q)?(p):(q)) #define min(p,q) ((p)<(q)?(p):(q)) #define chmax(a,b) ((a)=(a)>(b)?(a):(b)) #define chmin(a,b) ((a)=(a)<(b)?(a):(b)) #define abs(p) ((p)>=(0)?(p...
main.c: In function 'main': main.c:19:20: error: lvalue required as left operand of assignment 19 | N%2==0 ? s=2: s=3; | ^
s366331568
p03775
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for(int i=0;i<(int)(n);i++) #define rrep(i, n) for(int i=((int)(n));i>0;i--) #define FOR(i, m, n) for(int i = m; i < n; i++) #define SORT(c) sort((c).begin(),(c).end()) #define REVERSE(c) reverse((c).begin(),(c).end()) #define REVSORT(c) SORT(c);REVERSE(c...
a.cc: In function 'int main()': a.cc:26:32: error: expected ',' or ';' before ')' token 26 | int X = F(A, B)); | ^
s981614768
p03775
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for(int i=0;i<(int)(n);i++) #define rrep(i, n) for(int i=((int)(n));i>0;i--) #define FOR(i, m, n) for(int i = m; i < n; i++) #define SORT(c) sort((c).begin(),(c).end()) #define REVERSE(c) reverse((c).begin(),(c).end()) #define REVSORT(c) SORT(c);REVERSE(c...
a.cc: In function 'int main()': a.cc:26:40: error: too few arguments to function 'll F(ll, ll)' 26 | ll ans = max(ans, min(F(i), F(B))); | ~^~~ a.cc:14:4: note: declared here 14 | ll F(ll a, ll b){ | ^ a.cc:26:46: error: too few arguments to fun...
s468293527
p03775
C++
#include <bits/stdc++.h> #define int long long #define rep(i,n) for(int i=0;i<n;++i) #define all(a) a.begin(),a.end() #define P pair<long long,long long> #define double long double using namespace std; //桁 int kt(int a){ double b=a; b=log10(b); int c=b; return c+1; } int lcm(int a,int b){ int d=a,e=b,f; if...
a.cc: In function 'int main()': a.cc:57:12: error: expected primary-expression before '=' token 57 | if(a%i===0){ | ^
s315668763
p03775
C++
#include <bits/stdc++.h> using namespace std; int main() { int64_t n; cin>>n; int64_t z=0; int64_t x=sqrt(n)/1; for(int i=0;i<x;i++){ if(n%(x-i))==0){ z+=n/(x-i); break; } } int count=0; while(z>0){ z/10; count++; } cout<<count; }
a.cc: In function 'int main()': a.cc:9:16: error: expected primary-expression before '==' token 9 | if(n%(x-i))==0){ | ^~
s259776798
p03775
C++
#include <bits/stdc++.h> using namespace std; int main() { int64_t n; cin>>n; int64_t z=0; for(int i=0;i<sqrt(n)/1;i++){ if(n%((sqrt(n)/1)-i))==0){ z+=n/((sqrt(n)/1)-i); break; } } int count=0; while(z>0){ z/10; count++; } cout<<count; }
a.cc: In function 'int main()': a.cc:8:9: error: invalid operands of types 'int64_t' {aka 'long int'} and '__gnu_cxx::__enable_if<true, double>::__type' {aka 'double'} to binary 'operator%' 8 | if(n%((sqrt(n)/1)-i))==0){ | ~^~~~~~~~~~~~~~~~ | | | | | ...
s571652283
p03775
C++
#include <bits/stdc++.h> using namespace std; int main() { int64_t n; cin>>n; for(int i=0;i<sqrt(n)/1;i++){ if(n%((sqrt(n)/1)-i))==0){ int64_t z= n/((sqrt(n)/1)-i); break; } } int count=0; while(z>0){ z/10; count++; } cout<<count; }
a.cc: In function 'int main()': a.cc:7:9: error: invalid operands of types 'int64_t' {aka 'long int'} and '__gnu_cxx::__enable_if<true, double>::__type' {aka 'double'} to binary 'operator%' 7 | if(n%((sqrt(n)/1)-i))==0){ | ~^~~~~~~~~~~~~~~~ | | | | | ...
s268694290
p03775
C++
#include <bits/stdc++.h> using namespace std; int main() { int64_t n; cin>>n; int(int i=0;i<sqrt(n)/1;i++){ if(n%((sqrt(n)/1)-i))==0){ int64_t z= n/((sqrt(n)/1)-i); break; } } int count=0; while(z>0){ z/10; count++; } cout<<count; }
a.cc: In function 'int main()': a.cc:6:3: error: expected primary-expression before 'int' 6 | int(int i=0;i<sqrt(n)/1;i++){ | ^~~ a.cc:6:15: error: 'i' was not declared in this scope 6 | int(int i=0;i<sqrt(n)/1;i++){ | ^ a.cc:13:9: error: 'z' was not declared in this scope 13 ...
s272809835
p03775
C
/* Coached by rainboy */ #include <stdio.h> int length(long long n) { return n == 0 ? 0 : length(n / 10) + 1; } int main() { long long n, a; scanf("%lld", &n); for (a = 1; a <= n / a; a++) if (n % a == 0) a_ = a; printf("%d\n", length(n / a_)); return 0; }
main.c: In function 'main': main.c:14:25: error: 'a_' undeclared (first use in this function); did you mean 'a'? 14 | a_ = a; | ^~ | a main.c:14:25: note: each undeclared identifier is reported only once for each function it appears ...
s769296945
p03775
C++
#include <iostream> #include <vector> #include <string> auto main() -> int { int n = 0; std::cin >> n; std::vector<int> my_vec; for (auto i = 0; i < n; ++i) { if (n / i == 0) my_vec.emplace_back(n / i < i ? n / i : i); } int num = *std::min_element(my_vec.begin(), my_vec.end...
a.cc: In function 'int main()': a.cc:17:20: error: 'min_element' is not a member of 'std'; did you mean 'tuple_element'? 17 | int num = *std::min_element(my_vec.begin(), my_vec.end()); | ^~~~~~~~~~~ | tuple_element
s422180445
p03775
C++
#include <iostream> #include <vector> #include <string> auto main() -> int { int n = 0; std::cin >> n; std::vector my_vec; for (auto i = 0; i < n; ++i) { if (n / i == 0) my_vec.emplace_back(n / i < i ? n / i : i); } int num = *std::min_element(my_vec.begin(), my_vec.end()); ...
a.cc: In function 'int main()': a.cc:9:16: error: class template argument deduction failed: 9 | std::vector my_vec; | ^~~~~~ a.cc:9:16: error: no matching function for call to 'vector()' In file included from /usr/include/c++/14/vector:66, from a.cc:2: /usr/include/c++/14/bi...
s327406092
p03775
C++
// luogu-judger-enable-o2 #include <bits/stdc++.h> int lenlong(int i) { int len=0; while(i!=0) len++,i/=10; return len; } using namespace std; int main() { int a; cin>>a; for(int i=sqrt(a);i>=1;i--) if(a%i==0) cout<<lenlong(a/i)<<endl; } }
a.cc:19:1: error: expected declaration before '}' token 19 | } | ^
s715819181
p03775
C++
// luogu-judger-enable-o2 #include <bits/stdc++.h> int lenlong(int i) { int len=0; while(i!=0) len++,i/=10; return len; } using namespace std; int main() { int a,b=0; cin>>a; for(int i=2;i<=sqrt(a);i++) if(a%i==0) c=1; if(!c) { cout<<lenlong(a); return 0; ...
a.cc: In function 'int main()': a.cc:17:5: error: 'c' was not declared in this scope 17 | c=1; | ^ a.cc:18:9: error: 'c' was not declared in this scope 18 | if(!c) | ^
s242004326
p03775
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll mod=1e9+7; int GetDigit(int num){ int digit=0; while(num!=0){ num/=10; digit++; } return digit; } int main(){ ll N; cin >> N; ll ans=N; int min=10; for(ll i=1; i<=sqrt(N); i++){ if(...
a.cc: In function 'int main()': a.cc:20:19: error: '\U0000ff1dsqrt' was not declared in this scope; did you mean 'sqrt'? 20 | for(ll i=1; i<=sqrt(N); i++){ | ^~~~~~ | sqrt
s858239557
p03775
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(n);++i) using ll =long long; ll func(ll a,ll b){ ll al=to_string(a).size(); ll bl=to_string(b).size(); return max(al,bl); } main(){ ll n; cin>>n; int ans=(1<<28); for(ll i=1;i*i<=n;++i){ if(n%i!=0)continue; ll a=i,b=n/i; ...
a.cc:10:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 10 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:17:12: error: no matching function for call to 'min(int&, ll)' 17 | ans=min(ans,func(a,b)); | ~~~^~~~~~~~~~~~~~~ In file included from /usr/includ...
s509041693
p03775
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(n);++i) using ll =long long; main(){ ll n; cin>>n; int ans=(1<<28); for(ll i=1;i*i<=n;++i){ if(n%i!=0)continue; ll a=i,b=n/i; ans=min(ans,max(to_string(a).size(),to_string(b).size())); } cout<<ans<<endl; }
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:12:12: error: no matching function for call to 'min(int&, const long unsigned int&)' 12 | ans=min(ans,max(to_string(a).size(),to_string(b).size())); | ...
s852609227
p03775
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(n);++i) using ll =long long; main(){ ll n; cin>>n; int ans=(1<<28); for(ll i=1;i*i<=n;++){ if(n%i!=0)continue; ll a=i,b=n/i; ans=min(ans,max(to_string(a).size(),to_string(b).size())); } cout<<ans<<endl; }
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:9:23: error: expected primary-expression before ')' token 9 | for(ll i=1;i*i<=n;++){ | ^ a.cc:12:12: error: no matching function for c...
s713578410
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:17: error: extended character 。 is not valid in an identifier 4 | long long n,ans;。 | ^ a.cc:4:17: 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 | ...
s271101280
p03775
C++
#include<iostream> #include<cmath> using namespace std; int main() { __int64 n; __int64 a,b; cin>>n; for(int i=1;i<=sqrt(n);i++) { if(n%i==0) { a=i; b=n/a; } } //cout<<a<<" "<<b<<endl; //int p,q; long long count=0; if(a>=b) { while(a!=0) { count++; a/=10; } } else { while(b!=0) ...
a.cc: In function 'int main()': a.cc:6:9: error: '__int64' was not declared in this scope; did you mean '__ynf64'? 6 | __int64 n; | ^~~~~~~ | __ynf64 a.cc:7:16: error: expected ';' before 'a' 7 | __int64 a,b; | ^~ | ; a.cc:8:1...
s945747481
p03775
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,c; int d=0; int b=a/c cin>>a; for(int i=1;i<=a;i++){ if(a%i==0){ if(c==i){ for(int j=0;b!=0;j++){ b=b/10; d++; } break; } c=i; } } cout<<d; }
a.cc: In function 'int main()': a.cc:8:3: error: expected ',' or ';' before 'cin' 8 | cin>>a; | ^~~
s409805933
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=0;a/c!=0;j++){ a/c=a/c/10; d++; } break; } c=i; } } cout<<d; }
a.cc: In function 'int main()': a.cc:12:10: error: lvalue required as left operand of assignment 12 | a/c=a/c/10; | ~^~
s878909667
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=0;a/c!=0;j++){ a/c=a/c/10; d++; break; } c=i; } } cout<<d; }
a.cc: In function 'int main()': a.cc:12:10: error: lvalue required as left operand of assignment 12 | a/c=a/c/10; | ~^~ a.cc:20:2: error: expected '}' at end of input 20 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s400983222
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=0;a/c!=0;j++){ a/c=a/c/10; d++; break; } c=i; } cout<<d; }
a.cc: In function 'int main()': a.cc:12:10: error: lvalue required as left operand of assignment 12 | a/c=a/c/10; | ~^~ a.cc:19:2: error: expected '}' at end of input 19 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^