submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s504594921
p03827
C++
#include "iostream" #include <string> using namespace std; int main(){ string s; int a; int b = 0; int c = 0; cin << a; cin << s; for (int i = 0; i < s.size(); i++){ if(s[i] = "I"){ b = b + 1; } if(s[i] = "D"){ b = b - 1; } if(b > c){ c = b; } } cout << c << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:13: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 10 | cin << a; | ~~~ ^~ ~ | | | | | int | std::istream {aka std::basic_istream<char>} a....
s312749941
p03827
C++
#include <iostream> #include <string> using namespace std; int main(){ string s; int a; int b = 0; int c = 0; cin << a; cin << s; for (int i = 0; i < s.size(); i++){ if(s[i] = "I"){ b = b + 1; } if(s[i] = "D"){ b = b - 1; } if(b > c){ c = b; } } cout << c << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:13: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 10 | cin << a; | ~~~ ^~ ~ | | | | | int | std::istream {aka std::basic_istream<char>} a....
s035597576
p03827
C++
#include <iostream> using namespace std; typedef long long int ll; int main(){ string s; ll n; cin >> n >> s; ll x = 0, a = INT_MIN; for(ll i=0 ; i<n ; i++){ if(s[i] == 'I'){ x++; } else { x--; } a = max(a, x); } a = max(a, 0ll); c...
a.cc: In function 'int main()': a.cc:9:19: error: 'INT_MIN' was not declared in this scope 9 | ll x = 0, a = INT_MIN; | ^~~~~~~ a.cc:2:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 1 | #include <iostream> +++ |+#include...
s031628252
p03827
C
Manami:proton manami$ cat b.c #include <stdio.h> int main(void){ int x=0; int N,i; int max=0;; scanf("%d\n",&N); char S; for(i=0; i<N; i++){ scanf("%c", &S); if(S == 'I'){ x++; if(max<x){ max = x; } }else{ x--; } } printf("%d\n",max); return 0; }
main.c:1:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token 1 | Manami:proton manami$ cat b.c | ^ In file included from /usr/include/stdio.h:47, from main.c:2: /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:28:43: error: unknown type name 'size...
s862172143
p03827
C++
#include <iostream> #include <string> using namespace std; int main(){ int x=0, max=0; int n; cin >> n; string s; cin >> s; for(int i=0; i<s.size(); i++){ if(s[i]=='I'){ x += 1; if(x>m) m=x; } if(s[i]=='D'){ x-=1; } } cout << max << endl; return 0; }
a.cc: In function 'int main()': a.cc:15:30: error: 'm' was not declared in this scope 15 | if(x>m) m=x; | ^
s421978287
p03827
C++
#include <iostream> #include <algorithm> #include <cstdio> #include <cmath> #include <string> #include <cctype> #include <stack> #include <queue> #include <vector> #include <cstdlib> #include <list> #define _USE_MATH_DEFINES #include <math.h> using namespace std; int main() { int N,cnt = 0,str,ans = 0; string S; ...
a.cc: In function 'int main()': a.cc:25:17: error: cannot convert 'std::__cxx11::basic_string<char>::length' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int' 25 |...
s937693355
p03828
C++
#include <iostream> #include <cmath> using namespace std; int main() { const int MOD = 1000000007; int N; cin >> N; int R = pow (N, 0.5); int arr[R]; for (int i = 0; i < R - 1; i ++){ arr[i] = 1; } int V = 2; for (int i = 2; i <= N; i ++){ while (i <= N){ if (i % V == 0 && C != 1){ ...
a.cc: In function 'int main()': a.cc:17:25: error: 'C' was not declared in this scope 17 | if (i % V == 0 && C != 1){ | ^
s963908666
p03828
Java
import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; public class Test { public static void main(String[] args) { int n = 1000; //入力データを処理して、結果を出力 Set<Integer> insu_set = new HashSet<>(); List<Integer> insu_list = new ArrayList<>();...
Main.java:7: error: class Test is public, should be declared in a file named Test.java public class Test { ^ 1 error
s157026293
p03828
C++
#include<bits/stdc++.h> #define _GLIBCXX_DEBUG using namespace std; int main(){ int N;cin>>N; const long mod=1000000007; bool prime[N+1]; for(int i=0;i<=N;i++) prime[i]=true; vector<int> E; for(int i=2;i<=N;i++){ if(prime[i]){ for(int j=i*2;j<=N;j+=i) prime[j]=false; E.push_back(i); } ...
a.cc: In function 'int main()': a.cc:26:13: error: 'X' was not declared in this scope 26 | F /=X; | ^
s417113087
p03828
C++
#include<iostresm> using namespace std; long long binpow(long long a, long long b, long long m) { a %= m; long long res = 1; while (b > 0) { if (b & 1) res = res * a % m; a = a * a % m; b >>= 1; } return res; } int main() { long long int n; cin>>n; long long int...
a.cc:1:9: fatal error: iostresm: No such file or directory 1 | #include<iostresm> | ^~~~~~~~~~ compilation terminated.
s319670758
p03828
C++
#include <bits/stdc++.h> using namespace std; int main() { #include <bits/stdc++.h> using namespace std; int main() { int N;cin>>N; int64_t Ans=0; for(int k=1;k<=N;k++){ //double kn=sqrt(k); int ans = 1; vector<int> vec(k+1); int num = k;// 素因数分解する変数num for (int i = 2; i <= k; i++) { while (num%i ...
a.cc: In function 'int main()': a.cc:8:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 8 | int main() { | ^~ a.cc:8:9: note: remove parentheses to default-initialize a variable 8 | int main() { | ^~ | -- a.cc:8:9: note: or rep...
s610419542
p03828
C++
#include<iostream> #include <vector> using namespace std; int main() { int n; int ans = 1; cin >> n; vector<int> x(n + 1); int num = n; // 素因数分解する変数num for (int i = 2; i <= n; i++) { while (num%i == 0) { // 素数で割り切れなくなるまで割っていく x.at(i)++; //割った個数を配列に足す num /= i; } } for (int i = 2; i <= n; i++) {...
a.cc:17:35: error: extended character   is not valid in an identifier 17 | x.at(i)++; //割った個数を配列に足す | ^ a.cc:24:36: error: extended character   is not valid in an identifier 24 | ans *= x.at(i) + 1; //それぞれを+1して掛けていく | ...
s045742457
p03828
C
#define Rep(i,l,r)for(int i=l;i<r;i++) void fac(int n,int a[]){ Rep(i,2,n+1){ int j=i; Rep(k,2,i+1){if(j==1)break;if(!j%k){a[k]++;j/=k;k=1;}}}return;} int main(){ int n,a[1009]={0};LL ans=1; scanf("%d",&n); fac(n,a); Rep(i,2,n+1)if(a[i]>0){ans*=(a[i]+1);ans%=1000000007;} printf("%lld",ans); return 0; }
main.c: In function 'main': main.c:7:27: error: unknown type name 'LL' 7 | int n,a[1009]={0};LL ans=1; | ^~ main.c:8:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 8 | scanf("%d",&n); | ^~~~~ main.c:1:1: note: in...
s966988781
p03828
C++
#include<bits/stdc++.h> using namespace std; #define int long long signed main() { int N; cin >> N; int cnt = 0; for(int i = 1; i <= N; i++) { cnt+=i; } int ans = 1; for(int i = 2; i <= N; i++) { int cnt2 = 1; bool ok = true; int X = cnt; for(int j = ...
a.cc: In function 'int main()': a.cc:33:22: error: invalid operands of types 'long long int' and 'double' to binary 'operator%' 33 | ans = ans%(1e9+7); | ~~~^~~~~~~~ | | | | | double | long long in...
s068549257
p03828
C++
/*------------------------------------ ........Bismillahir Rahmanir Rahim.... ..........created by Abdul Aziz....... ------------------------------------*/ #include <iostream> #include <algorithm> #include <stdio.h> #include <cmath> #include <vector> #include <set> #include <map> #include <cstring> #include <unordered_...
a.cc: In function 'long long int solve()': a.cc:52:27: error: overloaded function with no contextual type information 52 | exp = x + (n/p); | ^ a.cc:58:1: warning: no return statement in function returning non-void [-Wreturn-type] 58 | } | ^
s098100282
p03828
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; long long n, m, i, j, cnt[1005], np[1005], ans = 1, mod = 1e9 + 7; vector<long long> pri; void calc(int x) { int i; for (i = 0; i < pri.size() && pri[i] * pri[i] <= x; i++) { while (x % pri[i] == 0) { ...
a.cc: In function 'void calc(int)': a.cc:15:27: error: 's' was not declared in this scope 15 | cnt[pri[i]]++;s | ^
s682184803
p03828
C++
g++ #include <bits/stdc++.h> using namespace std; typedef long long ll; bool IsPrime(int num){ if (num < 2) return false; else if (num == 2) return true; else if (num % 2 == 0) return false; // 偶数はあらかじめ除く double sqrtNum = sqrt(num); for (int i = 3; i <= sqrtNum; i += 2) { if (num % i == 0) { ...
a.cc:1:5: error: stray '#' in program 1 | g++ #include <bits/stdc++.h> | ^ a.cc:1:1: error: 'g' does not name a type 1 | g++ #include <bits/stdc++.h> | ^ a.cc: In function 'bool IsPrime(int)': a.cc:10:20: error: 'sqrt' was not declared in this scope 10 | double sqrtNum = sqrt(num); | ...
s660414889
p03828
C++
#include<bits/stdc++.h> #include<iostream> #include<string> #include<cmath> #include<cstdio> #include<cctype> #include<cstring> #include<iomanip> #include<cstdlib> #include<ctime> #include<set> #include<map> #include<utility> #include<queue> #include<vector> #include<stack> #include<sstream> #include<algorithm> /******...
a.cc: In function 'int main()': a.cc:67:17: error: 'p' was not declared in this scope 67 | cin>>n>>p; | ^
s419999364
p03828
C++
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> V(N + 1); for (int i = 2; i <= N; i++) { int tmp = i; for (int j = 2; j <= N; j++) { while (tmp % j == 0) tmp /= j, V.at(i)++; } } long ans = 1; for (int i = 2; i < N + 1; i++) { if (V.at(i)) (an...
a.cc: In function 'int main()': a.cc:16:42: error: 'M' was not declared in this scope 16 | if (V.at(i)) (ans *= V.at(i) + 1) %= M; | ^
s579597573
p03828
C++
#include<bits/stdc++.h> using namespace std; set<int>f(int N){ set<int>S; for(int i=2;i<=N;i++){ bool x=true; for(int j=2;j<i;j++){ if(i%j==0){x=false; break;} } if(x){S.insert(i);break;} } return S; } int main(){ int N; cin>>N; set<int>s=f(N); map<int,int>M; for(auto p:s){ int a=N; int ans=1; ...
a.cc:28:1: error: expected unqualified-id before 'for' 28 | for(auto p:M){ | ^~~ a.cc:33:2: error: 'cout' does not name a type 33 | }cout<<ans<<endl; | ^~~~ a.cc:35:4: error: expected unqualified-id before 'return' 35 | return 0; | ^~~~~~ a.cc:36:1: error: expected declaration before '...
s365733416
p03828
C++
#include <algorithm> #include <iostream> #include <cmath> using namespace std; long long fc(int n) { if(n == 1) return 1; return n * fc(n-1); } int main() { int n; cin >>n; long long fd = fc(n); int sv[fd+1]; int ans = 0; for(long long i = 1; i<=fd; i++) { if(sv[i] == 1 || fd % i != 0) continue; ...
a.cc: In function 'int main()': a.cc:19:21: error: invalid operands of types 'int' and 'double' to binary 'operator%' 19 | ans = (ans + 2) % 10e9 + 7; | ~~~~~~~~~ ^ ~~~~ | | | | int double
s134499116
p03828
C++
#include <algorithm> #include <iostream> using namespace std; long long fc(int n) { if(n == 1) return 1; return n * fc(n-1); } int main() { int n; cin >>n; long long fd = fc(n); int sv[fd+1]; int ans = 0; for(long long i = 1; i<=fd; i++) { if(sv[i] == 1 || fd % i != 0) continue; sv[i] = 1; ...
a.cc: In function 'int main()': a.cc:18:21: error: invalid operands of types 'int' and 'double' to binary 'operator%' 18 | ans = (ans + 2) % 10e9 + 7; | ~~~~~~~~~ ^ ~~~~ | | | | int double
s998860063
p03828
C++
include <algorithm> include <iostream> using namespace std; long long fc(int n) { if(n == 1) return 1; return n * fc(n-1); } int main() { int n; cin >>n; long long fd = fc(n); int sv[fd+1]; int ans = 0; for(long long i = 1; i<=fd; i++) { if(sv[i] == 1 || fd % i != 0) continue; sv[i] = 1; s...
a.cc:1:1: error: 'include' does not name a type 1 | include <algorithm> | ^~~~~~~ a.cc: In function 'int main()': a.cc:10:10: error: 'cin' was not declared in this scope 10 | int n; cin >>n; | ^~~ a.cc:18:21: error: invalid operands of types 'int' and 'double' to binary 'operator%' 18 |...
s956796816
p03828
C++
#include<bits/stdc++.h> using namespace std; typedef unsigned long long int ull; // allPrimes[] stores all prime numbers less // than or equal to n. vector<ull> allPrimes; ll m=1000000000+7; // Fills above vector allPrimes[] for a given n void sieve(int n) { // Create a boolean array "prime[0..n]" and ...
a.cc:9:1: error: 'll' does not name a type; did you mean 'ull'? 9 | ll m=1000000000+7; | ^~ | ull a.cc: In function 'ull factorialDivisors(ull)': a.cc:65:35: error: 'm' was not declared in this scope 65 | result = (result*(exp+1))%m; | ^
s427259349
p03828
C++
#include <iostream> #include <cstdio> #include <vector> #include <algorithm> #include <map> #include <prettyprint.hpp> typedef long long ll; using namespace std; static const ll mod = 1000000007; bool is_prime(ll N){ ll i=2; while(i*i<N){ if(N % i == 0){ return false; }else{ ...
a.cc:6:10: fatal error: prettyprint.hpp: No such file or directory 6 | #include <prettyprint.hpp> | ^~~~~~~~~~~~~~~~~ compilation terminated.
s754079694
p03828
C++
//int a = stoi(c); 文字列をintへ //小文字から大文字 //transform(a.begin(), a.end(), a.begin(), ::toupper); //途中の出力をそのまま残さない //数値計算 個数以外はdouble //map<キー,値> p は辞書。p[キー] = 値 //map 全探索 //auto begin = p.begin(), end = p.end(); //for (auto it = begin; it != end; it++) {} //mapのキー:it->first mapのバリュー:it->second //絶対値 abs() //入力は空白で切れる //大文...
a.cc: In function 'int main()': a.cc:102:49: error: 'ac' was not declared in this scope 102 | for (auto it = begin; it != end; it++) {ac | ^~
s768949461
p03828
C++
//int a = stoi(c); 文字列をintへ //小文字から大文字 //transform(a.begin(), a.end(), a.begin(), ::toupper); //途中の出力をそのまま残さない //数値計算 個数以外はdouble //map<キー,値> p は辞書。p[キー] = 値 //map 全探索 //auto begin = p.begin(), end = p.end(); //for (auto it = begin; it != end; it++) {} //mapのキー:it->first mapのバリュー:it->second //絶対値 abs() //入力は空白で切れる //大文...
a.cc: In function 'int main()': a.cc:102:49: error: 'ac' was not declared in this scope 102 | for (auto it = begin; it != end; it++) {ac | ^~
s652863297
p03828
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<string> vs; typedef vector<bool> vb; typedef vector<char> vc; typedef vector<vector<int>> vvi; typedef vector<vector<string>> vvs; typedef vector<vector<char>> vvc; typedef vector<vector<bool>> vvb; typedef pair<i...
a.cc: In function 'int main()': a.cc:38:16: error: expected ';' before '}' token 38 | cout << ans | ^ | ; ...... 42 | } | ~
s449373921
p03828
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n,a=1; cin >> n; for(int i=0;i<n;i++) a*=i+1; //aの約数の数を求める vector<int> x(a); int b=a; for(int i=2;i<a;i++){ while(b%i==0){ b/=i; x.at(i)++; } } long long int p=1; for(int i=0;i<a;i++){ p*=x.at(...
a.cc: In function 'int main()': a.cc:29:2: error: expected '}' at end of input 29 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s011560367
p03828
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n,a=1; cin >> n; for(int i=0;i<n;i++) a*=i+1; //aの約数の数を求める vector<int> x(a); int b=a; for(int i=2;i<a;i++){ while(b%i==0){ b/=i; x.at(i)++; } } long long int p=1; for(int i=0;i<a;i++){ p*=x.at(...
a.cc: In function 'int main()': a.cc:26:19: error: expected ';' before 'cout' 26 | p=p%1000000007 | ^ | ; 27 | 28 | cout << p%1000000007 << endl; | ~~~~ a.cc:29:2: error: expected '}' at end of input 29 | } | ^ a.cc:4:11: not...
s614063009
p03828
C
#include <stdio.h> #define a (int)(1e9 + 7) int fn(int b,int c){ if(N<p){ return 0; } else{ return fn(p, N/p) + N/p; } } int main(){ int N,i,j; long long int num=1; scanf("%d",&N); int p[N+1]; for(i=0;i<=N;i++){ p[i] = i; } for(i=2;i<=N;i++){ if(p[i]!=0){ for(j=1;i*j<=N;j++){ p[i*j]=0; ...
main.c: In function 'fn': main.c:5:12: error: 'N' undeclared (first use in this function) 5 | if(N<p){ | ^ main.c:5:12: note: each undeclared identifier is reported only once for each function it appears in main.c:5:14: error: 'p' undeclared (first use in this function) 5 | if(N...
s843479368
p03828
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:10: error: variable or field 'divisor' declared void 33 | void divisor(i); | ^~~~~~~
s136842390
p03828
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 'void divisor(int)': a.cc:26:10: error: 'res' was not declared in this scope; did you mean 'rep'? 26 | return res; | ^~~ | rep a.cc: In function 'int main()': a.cc:33:10: error: variable or field 'divisor' declared void 33 | void divisor(i); | ^...
s539343308
p03828
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for(ll i = 0; i < (ll)(n); i++) #define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++) #define memi cout << endl #define kono(n) cout << fixed << setprecision(n) #define all(c) (c).begin(), (c).end() #define pb push_back #define hina c...
a.cc: In function 'int main()': a.cc:22:5: error: 'm' was not declared in this scope 22 | m = n - j; | ^
s646487668
p03828
Java
package AtCoderBeginnerContest052; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Scanner; public class C2 { // public class Main { static void solve() { int n = nextInt(); ...
Main.java:11: error: class C2 is public, should be declared in a file named C2.java public class C2 { ^ 1 error
s547228792
p03828
C++
#include<bits/stdc++.h> using namespace std; const int MAX = 1000000007 bool prime(int n) { for(int i = 2; i*i <= n; i++) if(n % i == 0) return false; return true; } vector<int> p(int n) { vector<int> temp; for(int i = 2; i < n; i++) if(prime(i)) temp.push_back(i); return...
a.cc:6:1: error: expected ',' or ';' before 'bool' 6 | bool prime(int n) | ^~~~ a.cc: In function 'std::vector<int> p(int)': a.cc:18:16: error: 'prime' was not declared in this scope 18 | if(prime(i)) | ^~~~~
s407197236
p03828
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; long long ans = 1; const long num = 1000000007; int i,j; const int sosList[11] = {2,3,5,7,11,13,17,19,23,27,31} int sos[n+1] = {}; for(i=2;i<=n;i++){ int tmp = i; for(j=0;j<11;j++){ while(tmp%sosList[j]==0){ sos[sosList[j]]++; ...
a.cc: In function 'int main()': a.cc:10:9: error: expected ',' or ';' before 'int' 10 | int sos[n+1] = {}; | ^~~ a.cc:15:33: error: 'sos' was not declared in this scope; did you mean 'cos'? 15 | sos[sosList[j]]++; | ^~~ ...
s664124368
p03828
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; long long ans = 1; const long num = 1000000007; int i,j; int sos[11]={}; //2,3,5,7,11,13,17,19,23,29,31 const int sosList[11] = {2,3,5,7,11,13,17,19,23,29,31]; for(i=1;i<=n;i++){ sos = {}; for(j=0;j<11;j++){ int tmp = i; while(t...
a.cc: In function 'int main()': a.cc:10:62: error: expected '}' before ']' token 10 | const int sosList[11] = {2,3,5,7,11,13,17,19,23,29,31]; | ~ ^ a.cc:10:62: error: expected ',' or ';' before ']' token a.cc:12:21: error: assigning to an array...
s937337488
p03828
C++
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <cmath> #include <map> typedef long long ll; #define rep(i,a,b) for(int i=a;i<b;++i) #define rrep(i,a,b) for(int i=a;i>=b;--i) using namespace std; ll mod = 1e9 + 7; int A,B; //int x[111]; ll coudp[111][111][5555]; string divide[4] =...
a.cc: In function 'int main()': a.cc:39:54: error: expected primary-expression before '%' token 39 | ans = ((ans % mod) * (x.second + 1) *%mod) % mod; | ^
s837430115
p03828
C++
# include <iostream> using namespace std; int num[1005]; void gen(int x){ for (int i = 2; i < N; i++){ while (x % i == 0){ num[i]++; x /= i; } } int main(void){ cin >> N; int res = 1; for (int j = 2; j<= N; j++) gen(j); for (int k = 1; k<= N; k++) res = res* (num[i]+1); cout << res...
a.cc: In function 'void gen(int)': a.cc:6:25: error: 'N' was not declared in this scope 6 | for (int i = 2; i < N; i++){ | ^ a.cc:13:15: error: a function-definition is not allowed here before '{' token 13 | int main(void){ | ^ a.cc:22:2: error: expected '}' ...
s103396614
p03828
C++
#include <bits/stdc++.h> #include <math.h> using namespace std; typedef long long ll; bool prime(int n){ bool y=true; if(n == 1){ y = false; } else { for(int i=2;i<n;i++){ if(n%i == 0){ y = false; break; } } } return y; } int func(int n,int i){ int ans = 0; if...
a.cc: In function 'int main()': a.cc:51:22: error: expected ';' before '}' token 51 | ans %= 1000000007 | ^ | ; 52 | } | ~
s081439689
p03828
C++
#include <bits/stdc++.h> #include <math.h> using namespace std; typedef long long ll; bool prime(int n){ bool y=true; if(n == 1){ y = false; } else { for(int i=2;i<n;i++){ if(n%i == 0){ y = false; break; } } } return y; } int func(int n,int i){ int ans = 0; if...
a.cc: In function 'int main()': a.cc:39:3: error: expected ',' or ';' before 'for' 39 | for(int i=1;i<=n;i++){ | ^~~ a.cc:39:15: error: 'i' was not declared in this scope 39 | for(int i=1;i<=n;i++){ | ^
s735029967
p03828
C++
#include<stdio.h> int main(){ int n; int cunt=0,ans=0;; scanf("%d",&n); for (int i=1;i<=n;++i) { if (n%i==0)cunt++; } ans=cunt% 1e9+7; printf("%d",ans); return 0; }
a.cc: In function 'int main()': a.cc:10:13: error: invalid operands of types 'int' and 'double' to binary 'operator%' 10 | ans=cunt% 1e9+7; | ~~~~^ ~~~ | | | | int double
s729562234
p03828
C++
#include<bits/stdc++.h> using namespace std; long long int mod = 1e9+7; unsigned long long int r = 1, k1 = 0; unordered_map<int, int> mp; unordered_map<int, int>::iterator it; void fact(int x) { for(int i = 2; i*i <=x; i++) { while(x%i == 0) { mp[i] = (m[i]+1)%mod; x = x/i; } } if(x >...
a.cc: In function 'void fact(int)': a.cc:16:16: error: 'm' was not declared in this scope 16 | mp[i] = (m[i]+1)%mod; | ^
s323720115
p03828
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; int main(){ int n,ans=1; vector<int> v(n); cin>>n; rep(i,n) v[i]=0; for(int i=1;i<=n;i++){ int k=i; for(int j=2;j<=i){ while(k%j==0){ v[j-1]++; k/=j; } } } for(int i=1;i<n;...
a.cc: In function 'int main()': a.cc:11:21: error: expected ';' before ')' token 11 | for(int j=2;j<=i){ | ^ | ;
s522240696
p03828
C++
#include <iostream> #include <vector> #include <cmath> vector <bool> eratos(50,true); using namespace std; int main(){ //eratos; eratos[0] = false; eratos[1] = false; for(int i = 0; i < 50; i++){ if(eratos[i] == true){ for(int j = 2; i*j < 50; j++) eratos[i*j] = false; } } long long int N; ...
a.cc:32:9: error: extended character   is not valid in an identifier 32 |  d *= j; | ^ a.cc:5:1: error: 'vector' does not name a type 5 | vector <bool> eratos(50,true); | ^~~~~~ a.cc: In function 'int main()': a.cc:11:3: error: 'eratos' was not declared in this scope 11 | eratos[...
s960452404
p03828
C++
#include <iostream> using namesapce std; long long F(int x){ if (x=0) return 1; else if (x=1) return 1; else return (x-2)+(x-1); } int main(){ int N; cin>>N; const int MOD =1000000007; long long ans=0; ans=F(N); cout<<ans%MOD<<endl; }
a.cc:2:7: error: expected nested-name-specifier before 'namesapce' 2 | using namesapce std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:10:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 10 | cin>>N; | ^~~ | std::cin In file included from a.cc:1: /usr/i...
s814271677
p03828
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); long n = sc.nextLong(); long[] dp = new long[n+1]; long count = 0; for(int i = 1;i <= n;i++){ for(int j = 1;j <= i;j++){ if(i%j==0)count++; } ...
Main.java:6: error: incompatible types: possible lossy conversion from long to int long[] dp = new long[n+1]; ^ Main.java:14: error: incompatible types: possible lossy conversion from long to int System.out.println(dp[n]); ^ 2 errors
s972033379
p03828
C++
import java.util.* fun main(args: Array<String>) { val sc = Scanner(System.`in`) val n = sc.nextInt() val isPrime = mutableList<Boolean>(n + 1, true) for(i in 2..n) if(isPrime[i]) { for(j in (i * 2)..n step i) isPrime[j] = false } var divisorCount = 1L for(i in 2..n) if(isPrime[i]) ...
a.cc:4:29: error: stray '`' in program 4 | val sc = Scanner(System.`in`) | ^ a.cc:4:32: error: stray '`' in program 4 | val sc = Scanner(System.`in`) | ^ a.cc:7:14: error: too many decimal points in number 7 | for(i in 2..n) ...
s877653204
p03828
C++
#include<iostream> #include<algorithm> #define int long long #define rep(s,i,n) for(int i=s;i<n;i++) using namespace std; bool p(int n){ int sum=0; for(int i=2;i<n;i++){ if(n%i==0){ sum++; } } if(sum==0){ return true; } else{ return false; } } int pr[168]; signed main(){ int n; cin>>n; int sum=0...
a.cc:45:1: error: 'v' does not name a type 45 | v | ^
s506671022
p03828
C++
using System; using System.Collections.Generic; namespace ProgrammingContest { class HashMap<K, V> : Dictionary<K, V> { public V this[K key] { get { V v; return TryGetValue(key, out v) ? v : base[key] = default(V); } ...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:6:11: error: 'HashMap' is not a class template 6 | class HashMap<K, V> : ...
s498336936
p03828
C++
#include<iostream> #include<string> #include<cmath> #include<map> #include<vector> using namespace std; typedef long long ll; const ll MOD = 1e9 + 7; int main(){ int N; cin >> N; ll ans = 1; vector<ll> mp(N + 10,0); vector<ll> prime; for(ll i = 2; i <= N; i++){ //N以下の素数を列挙する bool flag = true; ll ...
a.cc: In function 'int main()': a.cc:35:4: error: expected '}' at end of input 35 | } | ^ a.cc:13:11: note: to match this '{' 13 | int main(){ | ^
s277092590
p03828
C++
#include <iostream> #include <map> using namespace std; void prime_factor(int n, map<long long int, long long int>& res) { for (int i = 2; i * i <= n; i++) { while (n % i == 0) { ++res[i]; n /= i; } } if (n != 1) { if (res[n] > 0) res[n]++; else res[n] = 1; } } int main() { long long...
a.cc: In function 'int main()': a.cc:44:30: error: 'pow' was not declared in this scope 44 | ans %= (int)(pow(10, 9) + 7); | ^~~
s299086486
p03828
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<n;i++) long long inf=(long long)1E17; #define i_7 (long long)(1E9+7) long mod(long a){ long long c=a%i_7; if(c>=0)return c; return c+i_7; } using namespace std; long long gcd(long long a, long long b){ if(a<b){ swap(a,b); } if(a%b==0){ re...
a.cc: In function 'int main()': a.cc:106:23: error: 'j' was not declared in this scope 106 | ans = mod(ans *(e[j]+1)); | ^
s084305611
p03828
C++
#include <vector> #include <queue> #include <algorithm> #include <iostream> #include <string> #include <tuple> #include <set> #include <map> #include <complex> #include <iomanip> #include <cmath> using namespace std; typedef unsigned long long ll; int main() { int n, cnt = 0; cin >> n; int s[n + 1]; memset(s, ...
a.cc: In function 'int main()': a.cc:20:3: error: 'memset' was not declared in this scope 20 | memset(s, 0, sizeof(s) + 1); | ^~~~~~ a.cc:12:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 11 | #include <cmath> +++ |+#include <cstring> 12 ...
s229136094
p03828
C++
#include <bits/stdc++.h> using namespace std; int main() { long int n,x; bool prime=1; cin>>n; x=0; vector<long int> a(1000,1001); vector<long int> b(1000,1); for(int i=2;i<=n;i++){ for(int j=0;j<1000;j++){ if(i%a.at(j)==0){ b.at(j)++; prime*0; break; } el...
a.cc: In function 'int main()': a.cc:19:17: error: 'class std::vector<long int>' has no member named 'a'; did you mean 'at'? 19 | else if(a.a(j)=1001)break; | ^ | at a.cc:28:5: error: 'ans' was not declared in this scope; did you mean 'abs'? 28 | ans*=b.at(i) ...
s933225004
p03828
C++
#include <iostream> #include <string> #include <vector> #include <stack> #include <map> #include <set> #include <algorithm> #include <numeric> #include <math.h> #include <stdio.h> #include <ctype.h> #include <ios> #include <iomanip> using namespace std; #define N_MAX (100000) #define LL_MAX_NUM (1LL<<60) #define IN...
a.cc: In function 'int main()': a.cc:35:20: error: invalid operands of types 'int' and 'double' to binary 'operator%' 35 | cout << res%INF << endl; | ~~~^ | | | int
s603938467
p03828
C++
#include<bits/stdc++.h> using namespace std; int main(){ long long n; cin>>n; long long ans=1; for(int i=1;i<=n;i++){ ans=i%(1e9+7); } cout<<ans; }
a.cc: In function 'int main()': a.cc:10:14: error: invalid operands of types 'int' and 'double' to binary 'operator%' 10 | ans=i%(1e9+7); | ~^~~~~~~~ | | | | int double
s920639381
p03828
C++
#include<bits/stdc++.h> using namespace std; int main(){ long long n; cin>>n; long long ans=1; for(int i=1;i<=n;i++){ ans=i%(1e9+7) } cout<<ans; }
a.cc: In function 'int main()': a.cc:10:14: error: invalid operands of types 'int' and 'double' to binary 'operator%' 10 | ans=i%(1e9+7) | ~^~~~~~~~ | | | | int double
s706772900
p03828
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <algorithm> #include <vector> using namespace std; #define REP(i, n) for(int (i)=0; (i)<(n); (i)++) #define COUT(a) cout << (a); #define ENDL cout << "\n"; int main(int argc, char *argv[]) { int n,count=0; scanf("%d",&n); lo...
a.cc: In function 'int main(int, char**)': a.cc:19:20: error: invalid operands of types 'int' and 'double' to binary 'operator%' 19 | count=count%(1e9+7); | ~~~~~^~~~~~~~ | | | | int double
s042026322
p03828
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <algorithm> #include <vector> using namespace std; #define REP(i, n) for(int (i)=0; (i)<(n); (i)++) #define COUT(a) cout << (a); #define ENDL cout << "\n"; #define INF 1e9+7 int main(int argc, char *argv[]) { int n,count=0; scan...
a.cc: In function 'int main(int, char**)': a.cc:20:20: error: invalid operands of types 'int' and 'double' to binary 'operator%' 20 | count=count%INF; | ~~~~~^ | | | int
s295893236
p03828
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <algorithm> #include <vector> using namespace std; #define REP(i, n) for(int (i)=0; (i)<(n); (i)++) #define COUT(a) cout << (a); #define ENDL cout << "\n"; #define INF 10e9+7 int main(int argc, char *argv[]) { int n,count=0; sca...
a.cc: In function 'int main(int, char**)': a.cc:20:20: error: invalid operands of types 'int' and 'double' to binary 'operator%' 20 | count=count%INF; | ~~~~~^ | | | int
s092176057
p03828
C++
#include <iostream> #include <array> #include <vector> #include <iomanip> #include <string> #include <cmath> #include <algorithm> #include <queue> #include <map> #include <set> using namespace std; typedef pair<int,int> P; typedef long long LL; const LL INF=1<<31; const LL MOD=1000000007; int main(){ int n;...
a.cc: In function 'int main()': a.cc:38:2: error: expected '}' at end of input 38 | } | ^ a.cc:21:11: note: to match this '{' 21 | int main(){ | ^
s126671961
p03828
C
#include <stdio.h> int main() { int n; int prime[180]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71 ,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167 ,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269 ,271,277,281,283,293,307,311,313,317,331,337,...
main.c: In function 'main': main.c:14:19: error: expected identifier or '(' before 'int' 14 | ,983,991,997},int power[180]=0; | ^~~ main.c:20:13: error: 'power' undeclared (first use in this function) 20 | power[i]++; | ^~~~~ main.c:20:13: note: each undec...
s705549564
p03828
C++
N=int(input()) num=1 factors=[] for i in range(N,1,-1): num*=i r=2 while num!=1: x=0 while num%r==0: num//=r x+=1 if x: factors.append(x) r+=1 result=1 for i in factors: result*=i+1 print(result%1000000007)
a.cc:1:1: error: 'N' does not name a type 1 | N=int(input()) | ^
s929023680
p03828
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 VRSORT(v) sort(v.rbegin(), v....
a.cc: In function 'int main()': a.cc:37:25: error: 'prime_factorize' was not declared in this scope; did you mean 'prime_factorization'? 37 | for(int i=1;i<=n;i++) prime_factorize(i); | ^~~~~~~~~~~~~~~ | prime_factorization
s099886695
p03828
C++
from math import factorial N = int(input()) N = factorial(N) i = 2 num = 1 ans = 1 while N != 1: if N % i == 0: N //= i num += 1 else: i += 1 ans *= num num = 1 print(ans * num % (10**9 + 7))
a.cc:1:1: error: 'from' does not name a type 1 | from math import factorial | ^~~~
s503802468
p03828
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Atcoder { class Program { static List<int[]> list = new List<int[]>(); static int[] yMove = new int[] {-1,1,0,0}; static int[] xMove = new int[] {0,0,-1,1}; ...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.L...
s272326244
p03828
C++
#include<bits/stdc++.h> using ll = long long; using lli = long long int using namespace std; const ll MM = 1000000000; const ll mod = MM + 7; int main(){ int N, n; cin >> N; int a[n+5]; for(int i = 0; i <= N; i++){ a[i] = 1; } for(int i = 1; i <= N; i++){ n = i; for(int j = 2...
a.cc:3:26: error: expected ';' before 'using' 3 | using lli = long long int | ^ | ; 4 | using namespace std; | ~~~~~ a.cc: In function 'int main()': a.cc:8:15: error: 'cin' was not declared in this scope; did you mean 'std:...
s358434973
p03828
C++
#include<bits/stdc++.h> using ll = long long; using namespace std; const ll MM = 1000000000; const ll mod = MM + 7; int main(){ int N, n; cin >> N; int a[n+5]; for(int i = 0; i <= N; i++){ a[i] = 1; } for(int i = 1; i <= N; i++){ n = i; for(int j = 2; j <= N; j++){ ...
a.cc: In function 'int main()': a.cc:16:20: error: 'm' was not declared in this scope 16 | if(m % j == 0){ | ^
s675549008
p03828
C++
#include<bits/stdc++.h> using ll = long long; using namespace std; const ll MM = 1000000000; const ll mod = MM + 7; int main(){ int N, n; cin >> N; int a[n+5]; for(int i = 0; i <= N; i++){ a[i] = 1; } for(int i = 1; i <= N; i++){ n = i; for(int j = 2; j <= N; j++){ ...
a.cc: In function 'int main()': a.cc:15:19: error: 'm' was not declared in this scope 15 | while(m % j){ | ^
s894482414
p03828
C
#include<stdio.h> #include<math.h> int num_of_factors(int n,int k){ int ans=0; int m=k; while(n/k!=0){ ans+=n/k; k*=m; } return ans; } int main(){ int n,i,j,flag,a; long ans=1; scanf("%d",&n); for(i=2;i<=n;i++){ flag=1; for(j=2;j<=(int)sqrt(i);j++){ if(i%j==0) flag=0; }...
main.c: In function 'main': main.c:28:3: error: 'ret' undeclared (first use in this function) 28 | ret | ^~~ main.c:28:3: note: each undeclared identifier is reported only once for each function it appears in main.c:28:6: error: expected ';' at end of input 28 | ret | ^ | ; main....
s926941168
p03828
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; int a[1010]; int main(){ int x,d,i; cin>>x; for(i=2;i<=x;i++) { int n=i; for(d=2;d<=x;d++) { while(x%d==0) { x/=d; // cout<<d<<endl; a[d]++; } } if(x!=1) a[x]++; } ll sum=1...
a.cc: In function 'int main()': a.cc:25:20: error: 'n' was not declared in this scope 25 | for(d=2;d<=n;d++) | ^
s907451908
p03828
C++
#include <iostream> #include <algorithm> #include <functional> #include <string> #include <vector> #include <stdio.h> using namespace std; #define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i) typedef long long ll; vector<bool> eratosthenes(int n) { vector<bool> prime(n + 1); for (int i = 2; i <= n; i++) { p...
a.cc: In function 'int main()': a.cc:32:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 32 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s915486512
p03828
C++
#include <iostream> #include <algorithm> #include <functional> #include <string> #include <vector> #include <stdio.h> using namespace std; #define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i) typedef long long ll; vector<bool> eratosthenes(int n) { vector<bool> prime(n + 1); for (int i = 2; i <= n; i++) { p...
a.cc: In function 'int main()': a.cc:32:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 32 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s385975911
p03828
C++
#define mod 1000000007; using namespace std; int main() { int N; cin >> N; long sum = 1; long long a[1001]; for (int i = 2; i <= N; ++i) { int k = i; for (int j = 2; k > 1;) { if (k%j == 0) { a[j]++; k /= j; } else { j++; } } } for (int i = 2; i <= N; ++i) { sum *= (a[i] + 1); ...
a.cc: In function 'int main()': a.cc:5:9: 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 | #define mod 1000000007; a.cc:24:9...
s213194888
p03828
C++
#include <bits/stdc++.h> using namespace std; int main(){ int ans=0,n,array[1001]={}; cin>>n; for(int i=1;i<=1000;i++){ for(int j=1;j<=i;j++){ array[i-1]+=(i%j==0); } } for(int i=0;i<n;i++){ ans+=array[i]; ans%=1000000007 } cout<<ans<<endl; }
a.cc: In function 'int main()': a.cc:14:20: error: expected ';' before '}' token 14 | ans%=1000000007 | ^ | ; 15 | } | ~
s270065259
p03828
C++
#include <bits/stdc++.h> using namespace std; int main(){ int ans=0;n,array[1001]={}; cin>>n; for(int i=1;i<=1000;i++){ for(int j=1;j<=i;j++){ array[i-1]+=(i%j==0); } } for(int i=0;i<n;i++){ ans+=array[i]; } cout<<ans<<endl; }
a.cc: In function 'int main()': a.cc:5:13: error: 'n' was not declared in this scope; did you mean 'yn'? 5 | int ans=0;n,array[1001]={}; | ^ | yn a.cc:5:20: error: missing template arguments before '[' token 5 | int ans=0;n,array[1001]={}; | ^ a.c...
s810797914
p03828
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n;cin>>n; long int ans=1; map<int,int>prime; for(int i=2;i<=n;i++){ int a=i; for(int j=2;j<=i;j++){ for(;;){ if(a%j==0){ prime[j]++; a/=j; } else break; } } } map<int,i...
a.cc: In function 'int main()': a.cc:21:9: error: no match for 'operator=' (operand types are 'std::map<int, int>::iterator' {aka 'std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int> >, std::less<int>, std::allocator<std::pair<const int, int> > >::iterator'} and 'int') 21 | for(...
s328999767
p03828
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n;cin>>n; long int ans=1; map<int,int>prime; for(int i=2;i<=n;i++){ int a=i; for(int j=2;j<=i;j++){ for(;;){ if(a%j==0){ prime[j]++; a/=j; } else break; } } } for(itera...
a.cc: In function 'int main()': a.cc:20:18: error: class template argument deduction failed: 20 | for(iterator i=1;i!=prime.end();i++){ | ^ a.cc:20:18: error: no matching function for call to 'iterator(int)' In file included from /usr/include/c++/14/bits/stl_algobase.h:65, f...
s488510260
p03828
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n;cin>>n; long int ans=1; map<int,int>prime; for(int i=2;i<=n;i++){ int a=i; for(int j=2;j<=i;j++){ for(;;){ if(a%j==0){ prime[j]++; a/=j; } else break; } } } for(int i...
a.cc: In function 'int main()': a.cc:20:16: error: no match for 'operator<' (operand types are 'int' and 'std::map<int, int>::iterator' {aka 'std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int> >, std::less<int>, std::allocator<std::pair<const int, int> > >::iterator'}) 20 | for...
s380084025
p03828
C++
#include <iostream> #include<math.h> using namespace std; int y[1001]; int main(){ int n; long long ans=1; cin >> n; for(int i=2; i<=n; ++i){ int t = i; for(int k=2; k<=t; ++k){ if(t%k == 0){ t/=k; ++y[k]; --k; } } } for(int i...
a.cc: In function 'int main()': a.cc:23:14: error: expected primary-expression before 'long' 23 | ans %= long long(pow(10,9)+7); | ^~~~
s488178189
p03828
C++
#include <iostream> using namespace std; long long fact(int n){ if(n == 0){ return 1; }else{ return n * fact(n-1); } } int main(void){ int n; long long a[1000] = {},ans = 1,m; cin >> n; m = fact(n); x = fact(n); for(int i = 2;i <= x;i++){ while(m %...
a.cc: In function 'int main()': a.cc:18:5: error: 'x' was not declared in this scope 18 | x = fact(n); | ^
s474260449
p03828
C++
#include<iostream> #include<vector> #include<algorithm> #include<string> #include<cmath> #include<climits> #include<map> #include<set> #include<queue> #include<stack> #include<bitset> #include<iomanip> #include<functional> using namespace std; #define YES cout << "YES\n" #define Yes cout << "Yes\n" #define yes cout <<...
a.cc: In function 'int main()': a.cc:62:33: error: no match for 'operator*' (operand types are 'i64' {aka 'long long int'} and 'std::pair<const int, int>') 62 | for(auto ite : mp) ans = (ans * ite) % mod; | ~~~ ^ ~~~ | | | | ...
s266925834
p03828
C++
#include<bits/stdc++.h> using namespace std; #define md 1e+9 #define ll long long int main(){ int n; int dd[1001]={}; int div = 1; ll ans = 1; cin>>n; while(n>1){ while(n % div == 0){ dd[div]++; n /= div; } } for(int i=1;i<1000;i++){ ans = (ans*(dd[i]+1))%md; } cout<<ans<<end...
a.cc: In function 'int main()': a.cc:18:26: error: invalid operands of types 'long long int' and 'double' to binary 'operator%' 18 | ans = (ans*(dd[i]+1))%md; | ~~~~~~~~~~~~~~~^ | | | long long int
s837453124
p03828
C++
#include<bits/stdc++.h> using namespace std; #define mod 1e+9 #define ll long long int main(){ int n; int dd[1001]={}; int div = 1; ll ans = 1 cin>>n; while(n>1){ while(n % div == 0){ dd[div]++; n /= div; } } for(int i=1;i<1000;i++){ ans = (ans*(dd[i]+1))%mod; } cout<<ans<<en...
a.cc: In function 'int main()': a.cc:10:3: error: expected ',' or ';' before 'cin' 10 | cin>>n; | ^~~ a.cc:18:26: error: invalid operands of types 'long long int' and 'double' to binary 'operator%' 18 | ans = (ans*(dd[i]+1))%mod; | ~~~~~~~~~~~~~~~^ | | | ...
s107587889
p03828
C++
#include<bits/stdc++.h> #define MAX 1000000007 #define ll long long using namespace std; int main(){ int n; cin>>n; ll a[1050]={}; for(int i=2;i<=n;i++){ int tmp=i; for(int j=2;j<=n;j++){ if(tmp%j==0){ while(tmp%j==0){ a[j]++; tmp/=j; } } if(tmp==1){break;} } } long lon...
a.cc:39:5: error: redefinition of 'int main()' 39 | int main(){ | ^~~~ a.cc:5:5: note: 'int main()' previously defined here 5 | int main(){ | ^~~~
s804191659
p03828
C
#include<stdio.h> int main(){ int n; constexpr int a[1001]={0,1,2,4,8,16,30,60,96,160,270,540,792,1584,2592,4032,5376,10752,14688,29376,41040,60800,96000,192000,242880,340032,532224,677376,917280,1834560,2332800,4665600,5529600,7864320,12165120,16422912,19595520,39191040,60466176,85100544,102435840,204871680,2580480...
main.c: In function 'main': main.c:5:9: error: 'constexpr' undeclared (first use in this function) 5 | constexpr int a[1001]={0,1,2,4,8,16,30,60,96,160,270,540,792,1584,2592,4032,5376,10752,14688,29376,41040,60800,96000,192000,242880,340032,532224,677376,917280,1834560,2332800,4665600,5529600,7864320,121651...
s038647434
p03828
C
#include<bits/stdc++.h> using namespace std; typedef long long ll; ll n, fac = 1, ans = 1; map<ll, ll> mp; int main() { cin >> n; for(ll i = 1; i <= n; i++){ ll k = i; for(ll j = 2; k > 1; j++){ while(k % j == 0){ mp[j]++; k /= j; } ...
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s292871235
p03828
C++
#include "stdafx.h" #include<iostream> #include<string> #include<algorithm> #include<vector> #include<cmath> #include<stack> #include<map> #include<queue> using namespace std; int main() { int n; cin >> n; int sh[1000] = {}; for (int i = 2; i <= n; i++) { for (int j = 2; j <= sqrt(i); j++) { if (i%j == 0)goto ...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s974280089
p03828
C++
#include <bits/stdc++.h> #define rep(i,a,b) for(int i=int(a);i<int(b);++i) #include <iostream> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <complex> #include <vector> #include <list> #include <set> #include <queue> #include <stack> #include <map> #include <string> #include <algorit...
a.cc: In function 'int main()': a.cc:36:19: error: invalid operands of types 'int' and 'double' to binary 'operator%' 36 | cout << count % (1e9+7) << endl; | ~~~~~ ^ ~~~~~~~ | | | | int double
s619189858
p03828
C++
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int INF = 1e9; const ll LINF = 1e18; template<class S,class T> ostream& operator << (ostream& out,const pair<S,T>& o){ out << "(" << o.first << "," << o.second << ")"; return out; } template<c...
a.cc:56:26: error: extended character   is not valid in an identifier 56 | cout << ans << endl;   | ^ a.cc: In function 'int main()': a.cc:56:26: error: '\U000000a0' was not declared in this scope 56 | cout << ans << endl;   | ^
s462067195
p03828
C++
 #include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int INF = 1e9; const ll LINF = 1e18; template<class S,class T> ostream& operator << (ostream& out,const pair<S,T>& o){ out << "(" << o.first << "," << o.second << ")"; return out; } template<...
a.cc:1:1: error: extended character   is not valid in an identifier 1 |  #include "bits/stdc++.h" | ^ a.cc:1:2: error: stray '#' in program 1 |  #include "bits/stdc++.h" | ^ a.cc:56:26: error: extended character   is not valid in an identifier 56 | cout << ans << endl;   | ...
s050119049
p03828
C++
#include <bits\stdc++.h> using namespace std; long long n,m,i,j,cnt[1005],np[1005],ans=1,mod=1e9+7; vector<long long> pri; void calc(int x) { int i; for (i=0;i<pri.size()&&pri[i]*pri[i]<=x;i++) { while (x%pri[i]==0) { x/=pri[i]; cnt[pri[i]]++; } } if (x>1) cnt[x]++; } int main() { cin>>n; np[1]=1; f...
a.cc:1:10: fatal error: bits\stdc++.h: No such file or directory 1 | #include <bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s757970654
p03828
C++
#include<cstdio> #include<algorithm> #include<cmath> using namespace std; typedef unsigned long long ULL; #define MOD 1000000007 int main() { LL n; while(~scanf("%lld",&n)) { LL sum=1; for(LL i=1;i<=n;i++) sum=(sum*i)%MOD; LL ans=sqrt(sum); LL num=0; for(LL i=1;i<=ans;i++) { if(sum%i==0) num=...
a.cc: In function 'int main()': a.cc:9:9: error: 'LL' was not declared in this scope; did you mean 'ULL'? 9 | LL n; | ^~ | ULL a.cc:11:30: error: 'n' was not declared in this scope; did you mean 'yn'? 11 | while(~scanf("%lld",&n)) | ^...
s960996315
p03828
C++
#include <iostream> using namespace std; int main() { int N; cin >> N; int a[N+1]; memset(a,0,sizeof(a)); for (int j=1; j<=N; j++) { int k=j; for (int i=2; k>1; ) { if (k%i==0) { k/=i; a[i]++; } else { i++; } } } const int mod=1e9+7; long long int a...
a.cc: In function 'int main()': a.cc:8:3: error: 'memset' was not declared in this scope 8 | memset(a,0,sizeof(a)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstring> 2 | usi...
s606636291
p03828
C++
#include <iostream> #include <string> #include <cstring> #include <cstdio> #include <algorithm> #include <vector> #include <set> #include <map> #include <queue> #include <numeric> #define FOR(i, f, n) for(int (i) = (f); (i) < (n); (i)++) #define RFOR(i, f, n) for(int (i) = (f); (i) >= (n); (i)--) #define rep(i, n) for...
a.cc: In function 'int main()': a.cc:42:28: error: 'sqrt' was not declared in this scope 42 | for(int i = 2; i < sqrt(N); i++){ | ^~~~
s040004234
p03828
C++
#include <iostream> #include <string> using namespace std; int main() { int n; cin >> n; unsigned __int64 num = n; for (int i = n - 1; i > 0; --i) { num = num * i; } unsigned __int64 total = 0; for (unsigned __int64 i = num; i > 0; --i) { if (num % i == 0) { total = total + 1; } } cout << total%100...
a.cc: In function 'int main()': a.cc:10:26: error: expected initializer before 'num' 10 | unsigned __int64 num = n; | ^~~ a.cc:12:17: error: 'num' was not declared in this scope; did you mean 'enum'? 12 | num = num * i; | ^~~ | ...
s291774427
p03828
Java
import java.util.*; import java.lang.*; import java.io.*; import java.math.BigDecimal; public class BC52C { static long mod = (long)1e9 + 7; public static void main (String[] args) throws java.lang.Exception { InputReader in = new InputReader(System.in); PrintWriter w = new PrintWriter(System....
Main.java:6: error: class BC52C is public, should be declared in a file named BC52C.java public class BC52C { ^ 1 error
s978252523
p03828
C++
#include<bits/stdc++.h> typedef long long LL; #define mod 1E9+7 int N; int DIV[1001]; int main() { scanf("%d", &N); LL ans = 1; for(int i=1;i<=N;i++) { for(int j=1;j*j<=i;j++) { if(i%j==0) { DIV[j]++; DIV[i/j]++; ...
a.cc: In function 'int main()': a.cc:24:27: error: invalid operands of types 'LL' {aka 'long long int'} and 'double' to binary 'operator%' 24 | if(ans>mod) ans%=mod; | ^ a.cc:24:27: note: in evaluation of 'operator%=(LL {aka long long int}, double)'