submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s564194354
p03775
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,c; int d=0; cin>>a; for(int i=1;i<=a;i++) if(a%i==0){ if(c==i){ for(int j++;a/c!=0;j++){ a/c=a/c/10; d++; break; } c=i; } cout<<d; }
a.cc: In function 'int main()': a.cc:11:17: error: expected ';' before '++' token 11 | for(int j++;a/c!=0;j++){ | ^~ | ; a.cc:11:19: error: expected primary-expression before ';' token 11 | for(int j++;a/c!=0;j++){ | ^ a.cc:11:26: e...
s452302755
p03775
C++
#include<bits/stdc++.h> using namespace std; using ll=long long; int cnt(ll n){ int digits=0; while(n>0){ n/=10; digits++; } return digits; } int main(){ ll n; cin>>n; const int ans=cnt(n); for(ll a=1LL;a*a<=n;a++){ if(n%a!=0)continue; const ll b=n/a; const int cur=max(cnt(a),cnt(b))...
a.cc: In function 'int main()': a.cc:21:8: error: assignment of read-only variable 'ans' 21 | ans=min(ans,cur); | ~~~^~~~~~~~~~~~~
s280491184
p03775
C++
#include <bits/stdc++.h> #include <math.h> using namespace std; int NumberOfFigure(long long X){ long long count = 1; if( X > 9 ){ count = 0; for( int i = 0; i < 10; i++ ){ if( X == 0 ){ break; } else{ count += 1; X /= 10; } } } return count; } int main(){ long long N; long long n = f...
a.cc: In function 'int main()': a.cc:35:17: error: 'keta' was not declared in this scope 35 | cout << keta << endl; | ^~~~
s324711122
p03775
C++
#include <bits/stdc++.h> #include <math.h> using namespace std; int NumberOfFigure(long long X){ long long count = 1; if( X > 9 ){ count = 0; for( int i = 0; i < 10; i++ ){ if( X == 0 ){ break; } else{ count += 1; X /= 10; } } } return count; } int main(){ long long N; long long n = f...
a.cc: In function 'int main()': a.cc:28:32: error: 'J' was not declared in this scope 28 | if(i * J == N){ | ^ a.cc:35:17: error: 'keta' was not declared in this scope 35 | cout << keta << endl; | ^~~~
s879400722
p03775
C++
#include <bits/stdc++.h> using namespace std; int main(){ unsigned long long int a,d; cin>>a; d=a; int b,c,e,f; e=1; f=100; for(int i=1;i<d;i++){ if(d/10>1000000) d/=1000; if(a%i==0){ b=i; c=a%i; c=max(b,c) for(int j=0;j<100;j++){ if(c/10>9){ c=c/10; e++;...
a.cc: In function 'int main()': a.cc:17:16: error: expected ';' before 'for' 17 | c=max(b,c) | ^ | ; 18 | for(int j=0;j<100;j++){ | ~~~ a.cc:18:18: error: 'j' was not declared in this scope 18 | for(int j=0;j<100;j++){ | ...
s967333914
p03775
C++
#include <bits/stdc++.h> using namespace std; int main(){ unsigned long long int a,c,d; cin>>a; d=a; int b,e,f; e=1; f=100; for(int i=1;i<d;i++){ if(d/10>1000000) d/=1000; if(a%i==0){ b=i; c=a%i; c=max(b,c) for(int j=0;j<100;j++){ if(c/10>9){ c=c/10; e++;...
a.cc: In function 'int main()': a.cc:17:11: error: no matching function for call to 'max(int&, long long unsigned int&)' 17 | c=max(b,c) | ~~~^~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, f...
s854807128
p03775
C++
#include <bits/stdc++.h> using namespace std; int main(){ unsigned long long int a,c,d; cin>>a; d=a; int b,e,f; e=1; f=100; for(int i=1;i<d;i++){ if(d/10>1000000) d/=1000; if(a%i=0){ b=i; c=a%i; c=max(b,c) for(int j=0;j<100;j++){ if(c/10>9){ c=c/10; e++; ...
a.cc: In function 'int main()': a.cc:14:9: error: lvalue required as left operand of assignment 14 | if(a%i=0){ | ~^~ a.cc:17:11: error: no matching function for call to 'max(int&, long long unsigned int&)' 17 | c=max(b,c) | ~~~^~~~~ In file included from /usr/include/c++/14/alg...
s338538717
p03775
C++
#include <bits/stdc++.h> using namespace std; int main(){ float N; int a,b; cin >> N; for(int i=pow(N,0.5);0<i;i--){ if(N%i==0){ a=i; b=N/i; break; } } for(float i=0.0;;i++){ if(a%pow(10.0,i)==a){ a=i; break; } for(float i=0.0;;i++){ if(b%pow(10.0,i)...
a.cc: In function 'int main()': a.cc:10:9: error: invalid operands of types 'float' and 'int' to binary 'operator%' 10 | if(N%i==0){ | ~^~ | | | | | int | float a.cc:17:9: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'd...
s879007377
p03775
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N,a,b; cin >> N; for(int i=pow(N,0.5);0<i;i--){ if(N%i==0){ a=i; b=N/i; break; } } for(int i=0;;i++){ if(a%pow(10,i)==a){ a=i; break; } for(int i=0;;i++){ if(b%pow(10,i)==a){ b=i; ...
a.cc: In function 'int main()': a.cc:16:9: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%' 16 | if(a%pow(10,i)==a){ | ~^~~~~~~~~~ | | | | int __gnu_cxx::__promote<double>::__type {aka double} a.cc:21...
s593738272
p03775
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N,a,b; cin >> N; for(int i=pow(N,0.5);0<i;i--){ if(N%i==0){ a=i; b=N/i; break; } } for(int i=0;;i++){ if(a%pow(10,i)==a){ a=i; break; } for(int i=0;;i++){ if(b%pow(10,i)==a){ b=i; ...
a.cc: In function 'int main()': a.cc:16:9: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%' 16 | if(a%pow(10,i)==a){ | ~^~~~~~~~~~ | | | | int __gnu_cxx::__promote<double>::__type {aka double} a.cc:21...
s529790249
p03775
Java
import java.util.stream.LongStream; public class Main { public static void main(String[] args) { java.util.Scanner s = new java.util.Scanner(System.in); System.out.println(Main.calc(s.nextLong())); } public static long calc(long n) { return LongStream.rangeClosed(1, (int) Math.sqrt(n)) .filter(a -> n % a...
Main.java:17: error: reached end of file while parsing } ^ 1 error
s678510061
p03775
C++
9876543210
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 9876543210 | ^~~~~~~~~~
s127478991
p03775
C++
#include <bits/stdc++.h> using namespace std; int main(){ long long int N = 0; long long int B = 0; long long int c = 1; long long int i = 10; int num = 1; int ans = 0; cin >> N; for (c=1;c*c<=N;c++){ if(N%c==0){ B = n / c; while(B/i>0){ num = num + 1; i = i *10; ...
a.cc: In function 'int main()': a.cc:17:11: error: 'n' was not declared in this scope 17 | B = n / c; | ^
s975851600
p03775
C++
#include <bits/stdc++.h> using namespace std; int main(){ long long int N = 0; long long int B = 0; long long int c = 1; long long int i = 10; int num = 1; int ans = 0; cin >> N; for (c=1;c*c<=N;c++){ if(N%c==0){ while(B/i>0){ num = num + 1; i = i *10; } } e...
a.cc: In function 'int main()': a.cc:30:8: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 30 | cout >> ans >> endl; | ~~~~ ^~ ~~~ | | | | | int | std::ostream {aka std::basic_ostream<char>} a.cc:30:8: note: ...
s475966677
p03775
C++
#include <bits/stdc++.h> using namespace std; int main() { long long int N; cin>>N; int ans=15; for(long long int i=1; i*i<=N; i++) { if(N%i==0) { long long int Y=N/i; string y=Y, x=i; int Z; Z=max(x.size(), y.size()); ans=min(ans, Z); } } cout<<ans; return 0; ...
a.cc: In function 'int main()': a.cc:12:16: error: conversion from 'long long int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested 12 | string y=Y, x=i; | ^ a.cc:12:21: error: conversion from 'long long int' to non-scalar type 'std::string' {aka 'std::__...
s094481334
p03775
C++
#include <bits/stdc++.h> using namespace std; int main() { long long int N; cin>>N; int ans=15; for(long long int i=1; i*i<=N; i++) { if(N%i==0) { int Y=N/i; string y=Y, x=i; int Z; Z=max(x.size(), y.size()); ans=min(ans, Z); } } cout<<ans; return 0; }
a.cc: In function 'int main()': a.cc:12:16: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested 12 | string y=Y, x=i; | ^ a.cc:12:21: error: conversion from 'long long int' to non-scalar type 'std::string' {aka 'std::__cxx11::bas...
s322038013
p03775
C++
using namespace std; typedef long long ll; ///定義場所/// ll i, j, k, l, m, n; ll N, M, K; ll MOD = 1000000007; ll ans = 1000000000; //関数リスト// int ctoi(char c) { switch (c) { case '0': return 0; case '1': return 1; case '2': return 2; case '3': return 3; case '4': return 4; case '5': return 5; case '6': return 6...
a.cc:28:24: error: 'pair' does not name a type 28 | bool pairCompare(const pair<ll, ll> firstElof, pair<ll, ll> secondElof) | ^~~~ a.cc:28:28: error: expected ',' or '...' before '<' token 28 | bool pairCompare(const pair<ll, ll> firstElof, pair<ll, ll> secondElof) | ...
s604350408
p03775
C++
#include "bits/stdc++.h" using namespace std; using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; using vi = vector<int>; using vl = vector<ll>; using vvi = vector<vi>; using vvl = vector<vl>; const int INF = 1 << 28; const ll MOD = 1000000007; template <class T> bool chmax(T &a, const T &b) { ...
a.cc: In function 'int main()': a.cc:24:20: error: 'factors' was not declared in this scope; did you mean 'facs'? 24 | set<ll> facs = factors(n); | ^~~~~~~ | facs
s160985222
p03775
C++
#include <bits/stdc++.h> using namespace std; int main() { long long int N; cin>>N; int ans=15; for(long long int i=1; i*i<=N; i++) { if(N%i==0) { string y; y=to_string(N/i); ans=min(ans, y.size()); } } cout<<ans; }
a.cc: In function 'int main()': a.cc:13:14: error: no matching function for call to 'min(int&, std::__cxx11::basic_string<char>::size_type)' 13 | ans=min(ans, y.size()); | ~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-...
s648764392
p03775
C++
#include <bits/stdc++.h> using namespace std; int main() { long long int N; cin>>N; int ans=15; for(long long int i=1; i*i<=N; i++) { if(N%i==0) { long long int y=N/i; ans=min(ans, y.size()) } } cout<<ans; }
a.cc: In function 'int main()': a.cc:12:22: error: request for member 'size' in 'y', which is of non-class type 'long long int' 12 | ans=min(ans, y.size()) | ^~~~
s289316447
p03775
C++
#include <bits/stdc++.h> using namespace std; int main() { long N; double rrN; int rN,A,B,digit; digit = 0; cin >> N; rrN = sqrt(N); rN = rrN; Ns=N; for(int i=0;true;i++){ if(N%(rN-i)!=0) continue; else{ A=rN-i; break; } } B=N/A; digit = log10(B) + 1; cout << digit <<...
a.cc: In function 'int main()': a.cc:12:3: error: 'Ns' was not declared in this scope; did you mean 'N'? 12 | Ns=N; | ^~ | N
s178428291
p03775
C++
#include <bits/stdc++.h> using namespace std; int countDigit(int n) { int digit = 1; clock_t start,end; start = clock(); while((n /= 10) != 0) digit++; end = clock(); printf("countDigit() digit::%d time::%dms\n",digit,(int)(end - start)); } int main() { double N; int Ns; doub...
a.cc: In function 'int countDigit(int)': a.cc:17:1: warning: no return statement in function returning non-void [-Wreturn-type] 17 | } | ^ a.cc: In function 'int main()': a.cc:28:15: error: 'True' was not declared in this scope 28 | for(int i=0;True;i++){ | ^~~~
s324107120
p03775
C++
#include <bits/stdc++.h> using namespace std; int countDigit(int n) { int digit = 1; clock_t start,end; start = clock(); while((n /= 10) != 0) digit++; end = clock(); printf("countDigit() digit::%d time::%dms\n",digit,(int)(end - start)); } int main() { double N; double rrN; int r...
a.cc: In function 'int countDigit(int)': a.cc:17:1: warning: no return statement in function returning non-void [-Wreturn-type] 17 | } | ^ a.cc: In function 'int main()': a.cc:26:15: error: 'True' was not declared in this scope 26 | for(int i=0;True;i++){ | ^~~~ a.cc:27:9: error: inval...
s752363001
p03775
C++
#include <iostream> #include <cmath> #include <string> #include <cstring> #include <utility> #include <vector> #include <set> #include <map> #include <stack> #include <queue> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #define debug(x) cerr << #x << ':' << x << endl #define rep(i,n) ...
a.cc:64:5: error: redefinition of 'int main()' 64 | int main(){ | ^~~~ a.cc:21:5: note: 'int main()' previously defined here 21 | int main(){ | ^~~~
s697572448
p03775
C++
#include<bits/stdc++.h> using namespace std; int main() { long long n,ans; cin>>n; int k=0; for(int i=sqrt(n);i>=1;i--) { if(n%i==0) { ans=n/i; break; } } while(ans>0) { ++k; ans/=10; } printf("%d\n",s); return 0; }
a.cc: In function 'int main()': a.cc:21:19: error: 's' was not declared in this scope 21 | printf("%d\n",s); | ^
s880439250
p03775
C++
#include <bits/stdc++.h> using namespace std; int main(){ long long int n; cin >> n; long long int j,k,m = 0; for(int i = 1; i <= sqrt(n); i++){ if(n%i==0){ k = n/i for(j = 1; n>=10 ;j++){ k = k/10; } if(m<k){ k = m; } } break; } cout << m << endl; ...
a.cc: In function 'int main()': a.cc:10:14: error: expected ';' before 'for' 10 | k = n/i | ^ | ; 11 | for(j = 1; n>=10 ;j++){ | ~~~ a.cc:11:28: error: expected ';' before ')' token 11 | for(j = 1; n>=10 ;j++){ | ...
s854785795
p03775
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; int j; for(int i = sqrt(n); i <= n; i++){ if(n%i==0){ for(j = 0; n>=10 ;j++){ n = n/10; } } cout << j << endl; break; } } }
a.cc:18:1: error: expected declaration before '}' token 18 | } | ^
s260066397
p03775
C++
// {{{ #include <algorithm> #include <array> #include <bitset> #include <cmath> #include <cstdio> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <string> #include <tuple> #include <u...
a.cc: In instantiation of 'std::vector<_Tp> trial_division(T) [with T = long long int]': a.cc:67:28: required from here 67 | auto D = trial_division(N); | ~~~~~~~~~~~~~~^~~ a.cc:47:11: error: 'assert' was not declared in this scope 47 | assert(num > 1); | ~~~~~~^~~~~~~~~ a.c...
s977136478
p03775
C++
9998200081#include <bits/stdc++.h> using namespace std; void solve(long long N) {} // Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools (tips: You // use the default template now. You can remove this line by using your custom // template) int main() { long long N; scanf("%lld", &N); solve(N); ...
a.cc:1:11: error: stray '#' in program 1 | 9998200081#include <bits/stdc++.h> | ^ a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 9998200081#include <bits/stdc++.h> | ^~~~~~~~~~ a.cc: In function 'int main()': a.cc:11:3: error: 'scanf' was not declared in this scope ...
s202484017
p03775
C++
#include<iostream> #include<algorithm> typedef long long ll; using namespace std; int main() { ll n,maxv,maxv2; int i; int digit1 = 0, digit2 = 0; cin >> n; for (i = 1; i <= sqrt(n)+1; ++i) { if (n % i == 0) { maxv = i; } } maxv2 = n/maxv; while (maxv != 0) { maxv /= 10; ++digit1; } while (maxv2 !...
a.cc: In function 'int main()': a.cc:11:26: error: 'sqrt' was not declared in this scope 11 | for (i = 1; i <= sqrt(n)+1; ++i) { | ^~~~
s212608503
p03775
C++
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <iomanip> #include <queue> using namespace std; #define lol long long int main() { double N; cin >> N; int N2 = (int)(N); int n = (int)(sqrt(N)); vector<int> AB(4); AB[2] = 1; AB[3] = N2; for (int i = n; i < N2; i++) { if...
a.cc: In function 'int main()': a.cc:16:23: error: 'sqrt' was not declared in this scope 16 | int n = (int)(sqrt(N)); | ^~~~
s460459976
p03775
C++
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <iomanip> #include <queue> using namespace std; #define lol long long int main() { int N; cin >> N; int n = (int)(sqrt(N)); vector<int> AB(4); AB[2] = 1; AB[3] = N; for (int i = n; i < N; i++) { if (N % i == 0) { AB[0] ...
a.cc: In function 'int main()': a.cc:15:23: error: 'sqrt' was not declared in this scope 15 | int n = (int)(sqrt(N)); | ^~~~
s508413421
p03775
C++
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> using namespace std; #define LL long long #define R register LL n,ans,s; int main() { scanf("%lld",&n);。 for(int i=sqrt(n);i>2;--i)if(n%i==0){ans=n/i;break;} while(ans>0){++s;ans/=10;} cout<<s<<endl; return 0;...
a.cc:12:22: error: extended character 。 is not valid in an identifier 12 | scanf("%lld",&n);。 | ^ a.cc: In function 'int main()': a.cc:12:22: error: '\U00003002' was not declared in this scope 12 | scanf("%lld",&n);。 | ^~ a.cc:13:23: error: 'i' was not...
s110878398
p03775
C++
int main(){ long long n; cin>>n; int d=1; for(int i=1;i<=sqrt(n);i++){ if(n%i==0){ d=i; } } int t=n/d; int ans=0; while(t>0){ ans++; t /= 10; } cout<<ans<<endl; return 0; }
a.cc: In function 'int main()': a.cc:3:3: error: 'cin' was not declared in this scope 3 | cin>>n; | ^~~ a.cc:5:18: error: 'sqrt' was not declared in this scope 5 | for(int i=1;i<=sqrt(n);i++){ | ^~~~ a.cc:16:3: error: 'cout' was not declared in this scope 16 | cout<<ans<<...
s251099674
p03775
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ long long n; long long temp; int ans = 0; cin>>n; for(int i=1;i<=sqrt(n);i++) if(n%i==0)temp = i; temp = n / temp; while(temp>0){ temp /= 10; ans++; } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:12:24: error: 'sqrt' was not declared in this scope 12 | for(int i=1;i<=sqrt(n);i++) | ^~~~
s361287306
p03775
C++
#include<iostream> using namespace std; int main(){ long long n; long long temp; int ans = 0; cin>>n; for(int i=1;i<sqrt(n);i++) if(n%i==0)temp = i; temp = n / temp; while(temp>0){ temp /= 10; ans++; } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:11:23: error: 'sqrt' was not declared in this scope 11 | for(int i=1;i<sqrt(n);i++) | ^~~~
s840318490
p03775
C++
#include<iostream> using namespace std; int main(){ long long n; long long temp; int ans = 0; cin>>n; for(int i=1;i<sqrt(n);i++) if(n%i==0)temp = i; temp = n / temp; while(temp>0){ temp /= 10; ans++; } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:11:23: error: 'sqrt' was not declared in this scope 11 | for(int i=1;i<sqrt(n);i++) | ^~~~
s537896445
p03775
C++
#include <bits/stdc++.h> using namespace std; int getdigit(long long N) { int digit = 0; while(N>0) { digit++; N /= 10; } return digit; } int main() { long long N; cin >> N; int mindigit; for (int i = sqrt(N)+1; i > 0; i--) { if(N % i == 0) { mindigit = max(getdigit(i), getdigit(N /...
a.cc: In function 'int main()': a.cc:22:2: error: expected '}' at end of input 22 | } | ^ a.cc:13:12: note: to match this '{' 13 | int main() { | ^
s759614918
p03775
C++
#include <bits/stdc++.h> using namespace std; int getdigit(long long N) { int digit = 0; while(N>0) { digit++; N /= 10; } return digit; } int main() { long long N; cin >> N; int mindigit = 11; for (int i = sqrt(N)+1; i > 0; i--) { if(N % i == 0) { mindigit = min(mindigit, max(getdig...
a.cc: In function 'int main()': a.cc:20:15: error: expected ';' before '}' token 20 | return 0 | ^ | ; 21 | } | ~ a.cc:22:2: error: expected '}' at end of input 22 | } | ^ a.cc:13:12: note: to match this '{' 13 | int main() { |...
s876952745
p03775
C++
#include <bits/stdc++.h> using namespace std; int getdigit(int N) { int digit = 0; while(N>0) { digit++; N /= 10; } return digit; } int main() { long long N = scanf("lld" N); int mindigit = 11; for (int i = 1; i <= sqrt(N); i++) mindigit = min(mindigit, getdigit(i) + getdigit(N - i)) cout <<...
a.cc: In function 'int main()': a.cc:14:28: error: expected ')' before 'N' 14 | long long N = scanf("lld" N); | ~ ^~ | ) a.cc:16:93: error: expected ';' before 'cout' 16 | for (int i = 1; i <= sqrt(N); i++) mindigit = min(mindigit, getdigit(i) + ...
s155632193
p03775
C++
#include <bits/stdc++.h> using namespace std; int getdigit(int N) { int digit = 0 while(N>0) { digit++; N /= 10; } return digit; } int main() { long long N = scanf("lld", N); int mindigit = 11; for (int i = 1; i <= sqrt(N); i++) mindigit = min(mindigit, getdigit(i) + getdigit(N - i)) cout <<...
a.cc: In function 'int getdigit(int)': a.cc:6:3: error: expected ',' or ';' before 'while' 6 | while(N>0) { | ^~~~~ a.cc: In function 'int main()': a.cc:16:93: error: expected ';' before 'cout' 16 | for (int i = 1; i <= sqrt(N); i++) mindigit = min(mindigit, getdigit(i) + getdigit(N - i)) | ...
s823935567
p03775
C++
#include <stdio.h> #include <string> #include <algorithm> #include <map> #include <iostream> using namespace std; int main() { int N, ans = 0, B; cin >> N; for (int i = 1; i <= sqrt(N); i++) { if ((double)N/(double)(i*i)==(double)(N/(i*i)))B = N/i; } cout << B << endl; while (1){ ans++; B = B / 10; if (B...
a.cc: In function 'int main()': a.cc:11:30: error: 'sqrt' was not declared in this scope 11 | for (int i = 1; i <= sqrt(N); i++) { | ^~~~
s488235721
p03775
C++
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; int a,min=0; for(long long i=1; i*i<n; i++) { if(n%i==0) { a=n/i; while(a>0) { cnt++; a/=10; } } } cout << min << endl; }
a.cc: In function 'int main()': a.cc:12:9: error: 'cnt' was not declared in this scope; did you mean 'int'? 12 | cnt++; | ^~~ | int
s736200530
p03775
C++
#include"bits/stdc++.h" using namespace std; int f,a,b,n; int min(int i,int j){ return i<j; } int main(){ cin>>a>>>b; int c=strelen(a); int d=strlen(b); f=min(c,d); n=a*b; cout<<n; return 0; }//给你一个整数n 求F ( A,B )的最小值为,使得N = A×B
a.cc: In function 'int main()': a.cc:10:17: error: expected primary-expression before '>' token 10 | cin>>a>>>b; | ^ a.cc:11:15: error: 'strelen' was not declared in this scope; did you mean 'strnlen'? 11 | int c=strelen(a); int d=strlen(b); | ^~~~~~~ ...
s897430212
p03775
C++
#include"bits/stdc++.h" using namespace std; int f,a,b,n; int max(int i,int j){ return i>j; } int main(){ cin>>a>>>b; int c=strelen(a); int d=strlen(b); f=min(c,d); n=a*b; cout<<n; return 0; }//给你一个整数n 求F ( A,B )的最小值为,使得N = A×B
a.cc: In function 'int main()': a.cc:10:17: error: expected primary-expression before '>' token 10 | cin>>a>>>b; | ^ a.cc:11:15: error: 'strelen' was not declared in this scope; did you mean 'strnlen'? 11 | int c=strelen(a); int d=strlen(b); | ^~~~~~~ ...
s074709009
p03775
C++
var lines = []; var readline = require('readline'); var C = [].fill(0); var result = Infinity; var rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); rl.on('line', function (x) { lines.push(x); }) rl.on('close', function () { var N = Number(lines.shift()); var n = N; ...
a.cc:3:24: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 3 | var readline = require('readline'); | ^~~~~~~~~~ a.cc:12:7: warning: multi-character character constant [-Wmultichar] 12 | rl.on('line', function (x) { | ^~~~~~ a.cc:16:7: warn...
s079876931
p03775
C++
#include<iostream> #include <string> #include<algorithm> using namespace std; int main() { long long N; cin >> N; long long A, B; for (int i = sqrt(N); i >= 1; i--) { if (N%i == 0) { A = i * 1LL; B = N / i; break; } } string a = to_string(A), b = to_string(B); cout << max(a.size(), b.size()) << ...
a.cc: In function 'int main()': a.cc:11:22: error: 'sqrt' was not declared in this scope 11 | for (int i = sqrt(N); i >= 1; i--) { | ^~~~
s893122380
p03775
C++
#include<iostream> using namespace std; int main() { long N; cin >> N; int i = 1; for (;i * i <= N;++ i) if (N % i == 0) a = i; i = N / i; int ans = 1; while(i /= 10) ++ ans; cout << ans; }
a.cc: In function 'int main()': a.cc:7:42: error: 'a' was not declared in this scope 7 | for (;i * i <= N;++ i) if (N % i == 0) a = i; | ^
s064918543
p03775
C++
#include <iostream> #include <algorithm> using namespace std; long n;int ans = 0; int main() { cin >> n; for (int i = 1; i <= sqrt(n); i++) { if (n%i == 0)ans = log10(n / i) + 1; } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:7:30: error: 'sqrt' was not declared in this scope 7 | for (int i = 1; i <= sqrt(n); i++) { | ^~~~ a.cc:8:36: error: 'log10' was not declared in this scope 8 | if (n%i == 0)ans = log10(n / i) + 1; | ...
s674482577
p03775
C++
#include <iostream> #include <algorithm> using namespace std; long n; int ans = 0; int main() { cin >> n; for (int i = 1; i <= powl(10,log10(n)/2); i++) { if (n%i == 0) { ans = log10(n/i)+1; } } cout<< powl(10, log10(n) / 2) << endl; cout << log10(n) << endl; cout << ans << endl; }
a.cc: In function 'int main()': a.cc:8:38: error: 'log10' was not declared in this scope 8 | for (int i = 1; i <= powl(10,log10(n)/2); i++) { | ^~~~~ a.cc:8:30: error: 'powl' was not declared in this scope 8 | for (int i = 1; i <= powl(10,log10(n)/2); i...
s042727179
p03775
C++
#include <bits/stdc++.h> using namespace std; int function(long long int n,int keta){ int mi=keta; for(long long int i=1;i*i<=n;i++){ if(n%i==0){ long long int k=n/i; int ketak=0; while(k){ k/=10; ketak++; } mi=min(mi,ketak); } } return mi; } int main(){ long long ...
a.cc: In function 'int main()': a.cc:36:9: error: reference to 'function' is ambiguous 36 | cout<<function(n,keta)<<endl; | ^~~~~~~~ In file included from /usr/include/c++/14/functional:59, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53, from a.cc:1: /usr...
s824449474
p03775
C++
#include<bits/stdc++.h> using namespace std; string toString(const T& s) { ostringstream os; os << s; return os.str(); } int main() { string b; int n; cin>>n; for(int i=floor(sqrt(n));i>=1;i--) { if(n%i==0) { b=toString(n%i); cout<<b.length()<<endl; break; } } }
a.cc:3:23: error: 'T' does not name a type 3 | string toString(const T& s) { | ^
s540726972
p03775
C++
#include<bits/stdc++.h> using namespace std; int main() { string b; int n; cin>>n; for(int i=floor(sqrt(n));i>=1;i--) { if(n%i==0) { b=toString(n%i); cout<<b.length()<<endl; break; } } }
a.cc: In function 'int main()': a.cc:12:27: error: 'toString' was not declared in this scope 12 | b=toString(n%i); | ^~~~~~~~
s886178141
p03775
C++
#include<iostream> #include<cmath> using namespace std; int digits(long long n) { int r = 0; while(n > 0) { n /= 10; r++; } return r; } int func(long long a,long long b) { return max(digits(a),digits(b)); } int main() { long long N; int ans = 100; cin >> N; for(long long i=1;i*i=<N;i++) ...
a.cc: In function 'int main()': a.cc:32:31: error: expected primary-expression before '<' token 32 | for(long long i=1;i*i=<N;i++) | ^
s601713617
p03775
C++
#include<bits/stdc++.h> using namespace std; int main() { long long int n,i,t,s; cin>>n; for(i=sqrt(n);i>=1;i--) { if(n%i==0) { t=i,l=n/i; s=1; while(l>=10) { s++; l/=10; } cout<<s; re...
a.cc: In function 'int main()': a.cc:11:17: error: 'l' was not declared in this scope 11 | t=i,l=n/i; | ^
s808800628
p03775
C++
#include<bits/stdc++.h> using namespace std; using ll = long long; #define MM 1000000000 #define mod MM+7 #define INF (ll)1e18 #define PI acos(-1.0) #define NIL -1 int dx[4] = {0, 1, 0, -1}; int dy[4] = {1, 0, -1, 0}; int digit(ll m){ if(1 <= m && m < 10) return 1; else if(10 <= m && m < 100) return 2; else...
a.cc: In function 'int main()': a.cc:28:21: error: no matching function for call to 'min(ll&, int)' 28 | mn = min(mn, digit(i)*digit(n/i)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++...
s892129837
p03775
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,N) for(int i=0;i<int(N);++i) #define rep1(i,N) for(int i=1;i<int(N);++i) int cnt_digits(ll X){ int cnt=0; while(X>0){ X/=10; cnt++; } return cnt; } int main() { ll N; cin>>N; int ans=cnt_digits(N); rep1(A,1e5+1){ if(N%A==0){ ll B=N/A; int...
a.cc:6:16: error: 'll' was not declared in this scope 6 | int cnt_digits(ll X){ | ^~ a.cc: In function 'int main()': a.cc:16:9: error: 'll' was not declared in this scope 16 | ll N; | ^~ a.cc:17:14: error: 'N' was not declared in this scope 17 | cin>>N; ...
s145336569
p03775
C++
#include <iostream> #include <math.h> using namespace std; int f(long long a, long long b){ int numa = 0; int numb = 0; while(a > 0){ numa++; a /= 10; } while(b > 0){ numb++; b /= 10; } if(numa > numb) return numa; else return numb; } int main(void){ long n; cin >> n; int ans = I...
a.cc: In function 'int main()': a.cc:23:13: error: 'INT_MAX' was not declared in this scope 23 | int ans = INT_MAX; | ^~~~~~~ a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 2 | #include <math.h> +++ |+#include <climits> ...
s931831629
p03775
C++
#include<cmath> using namespace std; long long n,ans; int s; int main(){ scanf("%lld",&n); for(int i=sqrt(n);i>0;--i) if(n%i==0){ ans=n/i; break; } while(ans>0){ ++s; ans/=10; } printf("%d\n",s); return 0; }
a.cc: In function 'int main()': a.cc:6:5: error: 'scanf' was not declared in this scope 6 | scanf("%lld",&n); | ^~~~~ a.cc:16:5: error: 'printf' was not declared in this scope 16 | printf("%d\n",s); | ^~~~~~ a.cc:2:1: note: 'printf' is defined in header '<cstdio>'; this is probably fi...
s671166626
p03775
C++
#include<cstdio> #include<cmath> using namespace std; long long n,ans; int s; int main(){ scanf("%lld",&n);。 for(int i=sqrt(n);i>0;--i) if(n%i==0){ ans=n/i; break; } while(ans>0){ ++s; ans/=10; } printf("%d\n",s); return 0; }
a.cc:7:22: error: extended character 。 is not valid in an identifier 7 | scanf("%lld",&n);。 | ^ a.cc: In function 'int main()': a.cc:7:22: error: '\U00003002' was not declared in this scope 7 | scanf("%lld",&n);。 | ^~ a.cc:8:23: error: 'i' was not de...
s941667617
p03775
C++
#include <bits/stdc++.h> #include <windows.h> using namespace std; void Set_char(char k) { if (k>='a' && k<='z') { k=k-32; keybd_event(k,0,0,0); keybd_event(k,0,KEYEVENTF_KEYUP,0); } else if (k>='A' && k<='Z') { keybd_event(20,0,0,0); k=k-'A'+65; keybd_event(20,0,0,0); ...
a.cc:2:10: fatal error: windows.h: No such file or directory 2 | #include <windows.h> | ^~~~~~~~~~~ compilation terminated.
s928163863
p03775
C++
#include<bits/stdc++.h> using namespace std; int main() { POINT p; Sleep(2000); GetCursorPos(&p); cout<<p.x<<" "<<p.y<<endl; SetCursorPos(279,886); Sleep(100); mouse_event(MOUSEEVENTF_LEFTDOWN,279,886,0,0); Sleep(100); mouse_event(MOUSEEVENTF_LEFTUP,279,886,0,0); Sleep(100); SetCursorPos(263,46); Sleep(10...
a.cc: In function 'int main()': a.cc:6:9: error: 'POINT' was not declared in this scope 6 | POINT p; | ^~~~~ a.cc:7:9: error: 'Sleep' was not declared in this scope; did you mean 'sleep'? 7 | Sleep(2000); | ^~~~~ | sleep a.cc:8:23: error: 'p' was not dec...
s087961680
p03775
C++
// #include <bits/stdc++.h> #include <map> #include <set> #include <ctime> #include <cstring> #include <queue> #include <iostream> #include <algorithm> using namespace std; #define mod 1000000007 #define INF 1000000000 #define mp make_pair #define pb push_back #define mt make_tuple #define eb emplace_back #define al...
a.cc: In function 'int main()': a.cc:57:26: error: 'sqrt' was not declared in this scope 57 | for (int i=1; i<=sqrt(n); ++i) { | ^~~~
s581701990
p03775
C++
#include<iostream> using namespace std; int main(){ long N; cin >> N; long dive; for (long i = 1; i < N; i++){ if(N % i == 0){ dive = N / i; // cout << dive << endl; if (dive <= i) break; } } int copy = dive; int count = 0; while(1){ ...
a.cc: In function 'int main()': a.cc:24:28: error: expected primary-expression before '/' token 24 | cout << count << endl;*/ | ^ a.cc:25:1: error: expected primary-expression before '}' token 25 | } | ^
s514362602
p03775
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> p; const int inf=(1<<30); #define rep(i,a,n) for(int i=a;i<n;i++) #define rrep(i,a,n) for(int i=(a-1);i>=n;i--) ll cnt_digit(ll a){ ll x=0; while(a>0){ a/=10; x++; } return x; } int main(){ ll x; cin>>x; ll ans=x; ...
a.cc: In function 'int main()': a.cc:25:36: error: 'a' was not declared in this scope 25 | ll y=max(cnt_digit(a),cnt_digit(b)); | ^
s410170192
p03775
C++
//#include <bits/stdc++.h> //#include <stdio.h> #include<iostream> #include<cstdio> #include<bitset> #include<algorithm> #include<vector> #include<list> #include<queue> #include<stack> #include <bits/stdc++.h> #include<string> #include<string.h> #include<cmath> #include<utility> #include<functional> #include<map> #incl...
a.cc: In function 'int main()': a.cc:67:13: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and '<unresolved overloaded function type>') 67 | cin>> N >>endl; | ~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/iostre...
s170389017
p03775
C++
import math N = int(input()) ans = [] for i in range(1,round(math.sqrt(N))): if N%i == 0: ans.append(len(str(N//i))) print(min(ans))
a.cc:1:1: error: 'import' does not name a type 1 | import math | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s030194739
p03775
C++
#include <bits/stdc++.h> using namespace std; int main() { ll N; cin >> N; int m=0; for(int i=1;i++;i<=sqrt(N)){ if(N%i==0)m=i; } int r=N/m; int res=1; while (r>=10){ r/=10; res++; } cout <<res <<endl; }
a.cc: In function 'int main()': a.cc:5:4: error: 'll' was not declared in this scope 5 | ll N; | ^~ a.cc:6:11: error: 'N' was not declared in this scope 6 | cin >> N; | ^
s522786255
p03775
C++
#include <bits/stdc++.h> using namespace std; int main() { ll N; cin >> N; int m=0; for(int i=0;i++;i<=sqrt(N)){ if(N%i==0)m=i; } int r=N/m; int res=1; while (r>=10){ r/=10; res++; } cout <<res <<endl; }
a.cc: In function 'int main()': a.cc:5:4: error: 'll' was not declared in this scope 5 | ll N; | ^~ a.cc:6:11: error: 'N' was not declared in this scope 6 | cin >> N; | ^
s648831797
p03775
Java
import java.util.Scanner; import static java.lang.Math.*; class Main { public static void main(String[]$) { long N = new Scanner(System.in).nextInt(); for (long i = 1; i*i <= N; ++i) { if(N % i == 0) { ans = min(ans, max($(i), $(N/i))); } } System.out.println(ans); } static...
Main.java:10: error: cannot find symbol ans = min(ans, max($(i), $(N/i))); ^ symbol: variable ans location: class Main Main.java:10: error: cannot find symbol ans = min(ans, max($(i), $(N/i))); ^ symbol: variable ans location: class Main Main.java:13: error: cannot ...
s041765219
p03775
C++
#include <iostream> #include <algorithm> #include <cmath> using namespace std; int calcDigit(int); int calcMaxDigit(int, int); int main(void){ int N; cin >> N; int a=1; int b; int min_digit=INT32_MAX; for(; a<=static_cast<int>(sqrt(N)); a++){ if(N%a != 0){ continue; ...
a.cc: In function 'int main()': a.cc:14:19: error: 'INT32_MAX' was not declared in this scope 14 | int min_digit=INT32_MAX; | ^~~~~~~~~ a.cc:4:1: note: 'INT32_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' 3 | #include <cmath> +++ |+#i...
s147427161
p03775
C++
#include<cstdio> #include<cmath> using namespace std; long long n,ans; 。 int s; int main(){ scanf("%lld",&n); for(int i=sqrt(n);i>0;--i) if(n%i==0){ ans=n/i; break; } while(ans>0){ ++s; ans/=10; } printf("%d\n",s); return 0; }
a.cc:4:18: error: extended character 。 is not valid in an identifier 4 | long long n,ans; 。 | ^ a.cc:4:18: error: '\U00003002' does not name a type 4 | long long n,ans; 。 | ^~ a.cc: In function 'int main()': a.cc:14:11: error: 's' was not declared in this scope 1...
s228519133
p03775
C++
j#include <bits/stdc++.h> #define INF 100100100 #define MOD 1000000007 using namespace std; using ll = long long; using ull = unsigned long long ; #define FOR(i,n) for(ll i=0;i<n;i++) ull log_10(ull N){ ull count = 1; double N_ = N; while(N_>=10){ N_/=10; count++; } return count; } vecto...
a.cc:1:2: error: stray '#' in program 1 | j#include <bits/stdc++.h> | ^ a.cc:1:1: error: 'j' does not name a type 1 | j#include <bits/stdc++.h> | ^ a.cc:22:1: error: 'vector' does not name a type 22 | vector<ull> prime; | ^~~~~~ a.cc: In function 'int main(int, const char**)': a.cc:25:4: e...
s321052037
p03775
C++
#include<bits/stdc++.h> using namespace std; int calc(long long v) { int k = 1; while (v >= 10) { v /= 10; k++; } return k; } int main() { ios::sync_with_stdio(false); cin.tie(0); long long n; cin >> n; int ans = 1e9; for (long long i = 0; i*i <= n; i++) { if (n%i == 0) { long long v = n / i; an...
a.cc: In function 'int main()': a.cc:22:61: error: expected ')' before ';' token 22 | ans = min(ans, max(calc(i), calc(v)); | ~ ^ | )
s873526278
p03775
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; int score; int che(int n){ while(n > 0){ n /= 10; ++score; } return score; } int main() { int N; cin >> N; vector<int> c(N); for(int a = 1; a < sqrt(N); ++a){ int b = N / a; if (N % a == 0){ c.push_back(che(a...
a.cc: In function 'int main()': a.cc:18:22: error: 'sqrt' was not declared in this scope 18 | for(int a = 1; a < sqrt(N); ++a){ | ^~~~ a.cc:24:40: error: overloaded function with no contextual type information 24 | max = *max_element(c.begin(), c.end()); | ...
s031951645
p03775
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; int score; int che(int n){ while(n > 0){ n /= 10; ++score; } return score; } int main() { int N; cin >> N; vector<int> c(N); for(int a = 1; a < sqrt(N); ++a){ int b = N / a; if (N % a == 0){ c.push_back(che(a...
a.cc: In function 'int main()': a.cc:18:22: error: 'sqrt' was not declared in this scope 18 | for(int a = 1; a < sqrt(N); ++a){ | ^~~~ a.cc:24:40: error: overloaded function with no contextual type information 24 | max = *max_element(c.begin(), c.end()); | ...
s766025477
p03775
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; int n, score; int che(n){ while(n > 0){ n /= 10; ++score; } return score; } int main() { int N; cin >> N; vector<int> c(N); for(int a = 1; a < sqrt(N); ++a){ int b = N / a; if (N % a == 0){ c.push_back(che(a)...
a.cc:6:11: error: expected ',' or ';' before '{' token 6 | int che(n){ | ^ a.cc: In function 'int main()': a.cc:18:22: error: 'sqrt' was not declared in this scope 18 | for(int a = 1; a < sqrt(N); ++a){ | ^~~~ a.cc:21:22: error: 'che' cannot be used as a function 2...
s243451260
p03775
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n,b,ans=1e9; cin>>n; for(int a=1;a<=100000;i++){ if(n%a==0){ int keta=0; b=n/a; while(b){ b/=10; keta++; } ans=min(ans,keta); } } if(ans==1e9){ int keta=0; while(n){ n/=10; ...
a.cc: In function 'int main()': a.cc:7:25: error: 'i' was not declared in this scope 7 | for(int a=1;a<=100000;i++){ | ^
s240673926
p03775
C++
#include<iostream> #include<algorithm> using namespace std; using ll = long long; int cnt_digit(ll n) { int cnt = 0; while (n > 0) { n /= 10; cnt++; } return cnt; } int main() { ll n; cin >> n; int cnt = 0; int ans = cnt_digit(n); for (int i = 1; i <= sqrt(n); i++) { int b = 0; b = n % i; if (b == ...
a.cc: In function 'int main()': a.cc:20:30: error: 'sqrt' was not declared in this scope 20 | for (int i = 1; i <= sqrt(n); i++) { | ^~~~
s040829001
p03775
C++
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <climits> #include <sstream> using namespace std; int main(){ long int N; cin >> N; int F_min = INT_MAX; for(long int A = 1; A < sqrt(N); A++){ if(N % A == 0){ string a = to_string(A); string b = to_string...
a.cc: In function 'int main()': a.cc:16:27: error: 'sqrt' was not declared in this scope 16 | for(long int A = 1; A < sqrt(N); A++){ | ^~~~
s989937571
p03775
C++
#include<iostream> #include<vector> #include<sstream> #include<string> #include<numeric> #include <algorithm> #include<Math.h> using namespace std; int input(){ int x; cin>>x; return x; } int abs(int x){ if(x>=0){ return x; }else{ return -x; } } int gcd(int x, int y){ if(x<y){ return gcd(y,x); ...
a.cc:7:9: fatal error: Math.h: No such file or directory 7 | #include<Math.h> | ^~~~~~~~ compilation terminated.
s016748365
p03775
C++
#include<iostream> #include<vector> #include<sstream> #include<string> #include<numeric> #include <algorithm> using namespace std; int input(){ int x; cin>>x; return x; } int abs(int x){ if(x>=0){ return x; }else{ return -x; } } int gcd(int x, int y){ if(x<y){ return gcd(y,x); } if(y==0){ ...
a.cc: In function 'int main()': a.cc:119:22: error: 'sqrt' was not declared in this scope 119 | for(int i=1;i<(int)sqrt(N);i++){ | ^~~~
s883800224
p03775
C++
#include<stdio.h> #include<iostream> #include<algorithm> #include<cstdio> #include<string> #include<vector> typedef long long ll; using namespace std; const int wa=1e9+7; ll N; int main(void) { cin >> N; int mi = 10; for (int i = 1; i <= (int)sqrt(N); i++) { if (N%i != 0)continue; ll u = N / i; int k = 0; wh...
a.cc: In function 'int main()': a.cc:14:35: error: 'sqrt' was not declared in this scope 14 | for (int i = 1; i <= (int)sqrt(N); i++) { | ^~~~
s957521277
p03775
C++
#include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; long long int n; int main(){ cin>>n; for(int i=sqrt(n);i>=1;i--) { if(n%i==0){ int t=i,l=n/i; int s=1; while(l>=10){ s++; l/=10; ...
a.cc: In function 'int main()': a.cc:9:15: error: 'sqrt' was not declared in this scope 9 | for(int i=sqrt(n);i>=1;i--) | ^~~~
s974143103
p03775
C++
#include<iostream> #include<cmath> using namespace std; int main() { long long n; int m,i,x,j,y; cin>>n; m=sqrt(n); for(i=m;i>=1;i--)if(n%i==0){x=i;break;} y=n/i; for(i=0;x!=0;i++)x=x/10; for(j=0;y!=0;j++)y=y/10; cout<<max(i,j)<<ENdl; return 0; }
a.cc: In function 'int main()': a.cc:14:25: error: 'ENdl' was not declared in this scope 14 | cout<<max(i,j)<<ENdl; | ^~~~
s531457518
p03775
C++
#include<iostream> #include<cmath> using namespace std; int main() { long long n; int m,i,x,j,y; cin>>n; m=sqrt(n); for(i=m;i>=1;i--)if(n%i==0){x=i;break;} y=n/i; for(i=0;x!=0;i++)x=x/10; for(j=0;y!=0;j++)y=y/10; cout<<max(i,j) return 0; }
a.cc: In function 'int main()': a.cc:14:23: error: expected ';' before 'return' 14 | cout<<max(i,j) | ^ | ; 15 | return 0; | ~~~~~~
s138770730
p03775
C++
#include<cstdio> #include<cmath> using namespace std; long long x,sum; int ss; int main() { scanf("%lld",&x); for(int i=sqrt(x);i>0;--i) if(x%i==0) { sum=x/i; break; } while(sum>0) { ++ss; sum/=10; } printf("%d\x",ss); return 0; }
a.cc: In function 'int main()': a.cc:22:12: error: \x used with no following hex digits 22 | printf("%d\x",ss); | ^~~~~~
s802064251
p03775
C++
#include<iostream> #include<math.h> using namespace std; int main() { long long int a,za,shu,s=0; cin>>a; za=sqrt(a); for(int i=za;i>0;--i) { if(a%i==0) { shu=n/i; break; } } while(shu>0) { ++s; shu/=10; } cout<<s<<endl; return 0; }
a.cc: In function 'int main()': a.cc:13:29: error: 'n' was not declared in this scope 13 | shu=n/i; | ^
s246984264
p03775
C++
#include<iostream> using namespace std; long long n; char s[11],s2[11]; int main(){ cin>>n; for(int i=sqrt(n);i>=1;--i)if(n%i==0){ int i2=n/i; sprintf(s,"%d",i); sprintf(s2,"%d",i2); cout<<max(strlen(s),strlen(s2))<<endl; break; } return 0; }
a.cc: In function 'int main()': a.cc:7:15: error: 'sqrt' was not declared in this scope 7 | for(int i=sqrt(n);i>=1;--i)if(n%i==0){ | ^~~~ a.cc:11:19: error: 'strlen' was not declared in this scope 11 | cout<<max(strlen(s),strlen(s2))<<endl; | ^~~~~~ a.cc:2:...
s867376319
p03775
C++
#include <iostream> #include <math.h> using namespace std; int F(long long a, long long b) { int na = 0,nb = 0; do { a /= 10; na++; } while (a > 0); do { b /= 10; nb++; } while (b > 0); return (na > nb) ? na : nb; } int main() { long long N; int n; long long min = 20000000000i64; cin >> N; for ...
a.cc: In function 'int main()': a.cc:22:25: error: unable to find numeric literal operator 'operator""i64' 22 | long long min = 20000000000i64; | ^~~~~~~~~~~~~~
s174220236
p03775
C++
#include <iostream> #include <algorithm> #include <map> #include <vector> #include <string> using namespace std; typedef long long int lli; // 約数の列挙O(√n) map<lli, lli> prime_factor(lli n){ map<lli, lli> res; for (lli i = 2; i * i <= n; i++) { while (n % i == 0) { ++res[i]; n /= i; } } if ...
a.cc: In function 'int main(int, const char**)': a.cc:39:5: error: 'bitset' was not declared in this scope 39 | bitset<64> bs64(i); | ^~~~~~ a.cc:5:1: note: 'std::bitset' is defined in header '<bitset>'; this is probably fixable by adding '#include <bitset>' 4 | #include <vector> +++ |+#include <...
s405925470
p03775
C++
#include <bits/stdc++.h> #define REP(i, n) for(int i = 0;i < n;i++) #define REPR(i, n) for(int i = n;i >= 0;i--) #define FOR(i, m, n) for(int i = m;i < n;i++) #define FORR(i, m, n) for(int i = m;i >= n;i--) #define SORT(v, n) sort(v, v+n); #define VSORT(v) sort(v.begin(), v.end()); #define llong long long #define pb(a)...
a.cc: In function 'int main()': a.cc:35:5: error: 'min_num' was not declared in this scope 35 | min_num; | ^~~~~~~
s956439452
p03775
C++
#include <iostream> #include <algorithm> #include <string> constexpr long long INF = 10000000000; long long N; double sqr; long long ans; int main() { std::cin >> N; sqr = std::sqrt(N); ans = INF; for (long long i = 1; i < sqr; i++) { if (N%i == 0) { ans = std::min(ans, std::max(i, N / i)); } } std::c...
a.cc: In function 'int main()': a.cc:14:20: error: 'sqrt' is not a member of 'std'; did you mean 'sort'? 14 | sqr = std::sqrt(N); | ^~~~ | sort
s493694273
p03775
C++
#include<iostream> using namespace std; long long int n; int main() { cin>>n; for(int i=sqrt(n);i>=1;i--) { if(n%i==0) { int t=i,l=n/i; int s=1; while(l>=10) { s++; l/=10; } cout<<s; ...
a.cc: In function 'int main()': a.cc:7:15: error: 'sqrt' was not declared in this scope 7 | for(int i=sqrt(n);i>=1;i--) | ^~~~
s473488762
p03775
C++
#include <iostream> #include <cmath> using namespace std; int main() { long long n; cin >> n; int a = 0, b = 0; for (int i = sqrt(n); i >= 1; i--) { a = i; if (n % a == 0) { b = n / a; break; } } int ret = max(int(log10(a))++, int(log10(b))++); ...
a.cc: In function 'int main()': a.cc:19:19: error: lvalue required as increment operand 19 | int ret = max(int(log10(a))++, int(log10(b))++); | ^~~~~~~~~~~~~ a.cc:19:36: error: lvalue required as increment operand 19 | int ret = max(int(log10(a))++, int(log10(b))++); | ...
s885917916
p03775
C++
#include<bits/stdc++.h> using namespace std; int count_digit(long long n){ int digit = 0; while(n>0){ tmp/=10; digit++; }; return digit; } int main(){ long long n; int min; cin>>n; long long tmp = n; min = count_digit(n); for(long long i=1;i*i<=n;i++){ if(n%i!=0)continue; long ...
a.cc: In function 'int count_digit(long long int)': a.cc:9:5: error: 'tmp' was not declared in this scope; did you mean 'tm'? 9 | tmp/=10; | ^~~ | tm a.cc: In function 'int main()': a.cc:27:5: error: expected ',' or ';' before 'if' 27 | if(min>digit){ | ^~
s172036639
p03775
C++
#include<iostream> #include<string> #include<algorithm> #include<vector> #include<queue> #include<stack> #include<cstdlib> #include<ctime> using namespace std; typedef long long ll; void f(int a,int b) { string s = to_string(a); string t = to_string(b); cout << max(s.size(), t.size()) << endl; } int main() { int n;...
a.cc: In function 'int main()': a.cc:19:22: error: 'sqrt' was not declared in this scope 19 | for (int i = sqrt(n);; i++) { | ^~~~
s524855211
p03775
C++
#include <iostream> #include <math.h> using namespace std; int main() { int n,a,b,c=1; cin>>n; for(int i=0;i<1000000000){ if(i*i>=n){ a=i; break; } } for(int i=0;i<a;i++){ if(n%(i+1)==0){ b=(i+1); } } for(int i=0;i<10;i++){ if(b<10*c){ cout<<(i+1)<<endl; break; } c*=10; } return 0...
a.cc: In function 'int main()': a.cc:8:33: error: expected ';' before ')' token 8 | for(int i=0;i<1000000000){ | ^ | ;
s194605696
p03775
C++
#include <bits/stdc++.h> using namespace std; using int=long long; int divitor(int q){ int t=0; while(q>0){ q/=10; t++; } return t; } int main() { int n,ans,i; cin>>n; ans=divitor(n); for( i=1;i*i<=n;i++){ if(n%i==0){ int s=max(divitor(i),divitor(n/i)); ans=min(...
a.cc:3:7: error: expected nested-name-specifier before 'int' 3 | using int=long long; | ^~~
s000074386
p03775
C++
#include<iostream> #include<algorithm> #include<math.h> using namespace std; using ll = long long; int main() { ll n; cin >> n; ll ans = n/2; for (int i = 1;i <= sqrt(n);i++) { if (n%i == 0) { int j = n / i; int a = 0; for (int k = 0;k < 11;k++) { if (j / 10 == 0) { a++; ans = min(ans, a);...
a.cc: In function 'int main()': a.cc:18:50: error: no matching function for call to 'min(ll&, int&)' 18 | ans = min(ans, a); | ~~~^~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/includ...