submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3 values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s995931088 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
long long int a;
cin >>a;
long long int ans = 1;
for(int i=1;i<=a;i++){
ans = ans*i%1000000007;
}
cout << ans; <<endl;
}
| a.cc: In function 'int main()':
a.cc:11:16: error: expected primary-expression before '<<' token
11 | cout << ans; <<endl;
| ^~
|
s100736746 | p03796 | C | #include<stdio.h>
int main(){
int N;
int a=1;
scanf("%d",&N);
for(i=1;i<=N;i++)
{
a*=1;
}
return 0;
}
| main.c: In function 'main':
main.c:6:13: error: 'i' undeclared (first use in this function)
6 | for(i=1;i<=N;i++)
| ^
main.c:6:13: note: each undeclared identifier is reported only once for each function it appears in
|
s120137778 | p03796 | C++ | #include<stdio.h>
#include<stdlib.h>
int main()
{
int i,n;
long t;
scanf("%d", &n);
t = 1;
i = 2;
while (i <= n)
{
t = t * i;
i = i + 1;
}
if (n<17)
{
printf("%ld\n", t);
}
else printf("109+7\n");
system("pause");
| a.cc: In function 'int main()':
a.cc:20:25: error: expected '}' at end of input
20 | system("pause");
| ^
a.cc:4:1: note: to match this '{'
4 | {
| ^
|
s082140699 | p03796 | C++ | #include<stdio.h>
#include<stdlib.h>
int main()
{
float i, n;
long float t;
scanf("%f", &n);
t = 1, i = 2;
while (i <= n)
{
t = t * i;
i = i + 1;
}
if (t< 10e100)
{
printf("%.0lf\n", t);
}
else
{
printf("10e9+7\n");
}
system("pause");
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'long' specified with 'float'
6 | long float t;
| ^~~~
|
s325870076 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
#define repr(i,k,n) for(int i = (k); i < (n); i++)
#define rep(i,n) repr(i,0,n)
#define ALL(a) begin(a),end(a)
const ll INF = 114514810;
const ll MOD = 1000000007;
typedef vector<int> vi;
typedef vector<string> vs;
typedef long long ll;
int ctoi(const char c){
switch(c){
case '0': return 0;
case '1': return 1;
case '2': return 2;
case '3': return 3;
case '4': return 4;
case '5': return 5;
case '6': return 6;
case '7': return 7;
case '8': return 8;
case '9': return 9;
}
}
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
ll N,pow=1;
cin >> N;
rep(i,N){
pow = pow*i%MOD;
}
cout << pow << endl;
}
| a.cc:6:7: error: 'll' does not name a type
6 | const ll INF = 114514810;
| ^~
a.cc:7:7: error: 'll' does not name a type
7 | const ll MOD = 1000000007;
| ^~
a.cc: In function 'int main()':
a.cc:31:29: error: 'MOD' was not declared in this scope
31 | pow = pow*i%MOD;
| ^~~
a.cc: In function 'int ctoi(char)':
a.cc:24:1: warning: control reaches end of non-void function [-Wreturn-type]
24 | }
| ^
|
s522010388 | p03796 | C | #include <stdio.h>
int main()
{
int N,M=1;
//1<=N<=10^5
scanf("%d",&N);
for(int i=1;i<=N;i++){
M*=i;
}
printf("%d",M);
return 0;
} | main.c: In function 'main':
main.c:14:29: error: 'M\U0000ff09' undeclared (first use in this function)
14 | printf("%d",M);
| ^~~
main.c:14:29: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:32: error: expected ')' before ';' token
14 | printf("%d",M);
| ~ ^
| )
main.c:15:18: error: expected ';' before '}' token
15 | return 0;
| ^
| ;
16 | }
| ~
|
s542589748 | p03796 | C | #include <stdio.h>
#include<iostream>
using namespace std;
int main()
{
int N,M=1;
//1<=N<=10^5
scanf("%d",&N);
for(int i=1;i<=N;i++){
M*=i;
}
cout<<M<<" ";
return 0;
} | main.c:2:9: fatal error: iostream: No such file or directory
2 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s940317589 | p03796 | C++ | #include <bits/stdc++.h>
#include <algorithm>
using namespace std;
int main()
{
ll n,ans=1;
cin>>n;
for(int i=1;i<=n;i++){
ans*=i;
ans%=1000000007;
}
cout<<ans<<endl;
} | a.cc: In function 'int main()':
a.cc:7:5: error: 'll' was not declared in this scope
7 | ll n,ans=1;
| ^~
a.cc:8:10: error: 'n' was not declared in this scope; did you mean 'yn'?
8 | cin>>n;
| ^
| yn
a.cc:10:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
10 | ans*=i;
| ^~~
| abs
a.cc:13:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
13 | cout<<ans<<endl;
| ^~~
| abs
|
s230621005 | p03796 | C | include <stdio.h>
char s[200000];
int main() {
long long int i;
long long int n;//トレーニング回数//
long long int power;
long long int amari;
scanf("%lld", &n);
power = 1;
for (i = 1; i <= n; i++) {
power = power * i;
}
amari = power % 1000000007;
printf("%lld\n", amari);
return 0;
}
| main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
main.c: In function 'main':
main.c:12:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
12 | scanf("%lld", &n);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | include <stdio.h>
main.c:12:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
12 | scanf("%lld", &n);
| ^~~~~
main.c:12:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:22:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
22 | printf("%lld\n", amari);
| ^~~~~~
main.c:22:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:22:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:22:9: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s170819551 | p03796 | C | include <stdio.h>
char s[200000];
int main() {
long long int i;
long long int n;//トレーニング回数//
long long int power;
long long int amari;
scanf("%lld", &n);
power = 1;
for (i = 1; i <= n; i++) {
power = power * i;
}
amari = power % 1000000007;
printf("%lld\n", amari);
return 0;
}
| main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
main.c: In function 'main':
main.c:12:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
12 | scanf("%lld", &n);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | include <stdio.h>
main.c:12:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
12 | scanf("%lld", &n);
| ^~~~~
main.c:12:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:22:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
22 | printf("%lld\n", amari);
| ^~~~~~
main.c:22:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:22:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:22:9: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s108657465 | p03796 | C++ | #include <bits/std.c++.h>
#define rep(i,a,n) for(int (i) = (a);(i) < (n);(i)++)
typedef long long ll;
using namespace std;
int main(){
ll n,memo = 0;
cin >> n;
rep(i,1,n+1){
memo += i;
}
cout << memo % (pow(10,9)+7) << endl;
return 0;
} | a.cc:1:10: fatal error: bits/std.c++.h: No such file or directory
1 | #include <bits/std.c++.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
|
s824650361 | p03796 | C++ | #include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
using namespace std;
int main(){
int n;
cin>>n;
long long ans=1;
for(int i = 1; i <= n; ++i){
ans*=i;
ans%=MOD
}
cout<<ans<<endl;
} | a.cc: In function 'int main()':
a.cc:11:17: error: expected ';' before '}' token
11 | ans%=MOD
| ^
| ;
12 | }
| ~
|
s935981442 | p03796 | C++ | #include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
using namespace std;
int main(){
int n;
cin>>n;
long long ans=1;
for(int i = 1; i <= n; ++i){
ans*=i;
ans%=MOD
}
cout<<ans<<endl; | a.cc: In function 'int main()':
a.cc:11:17: error: expected ';' before '}' token
11 | ans%=MOD
| ^
| ;
12 | }
| ~
a.cc:13:17: error: expected '}' at end of input
13 | cout<<ans<<endl;
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s792010888 | p03796 | C++ | #include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
using namespace std;
int main(){
int n;
cin>>n;
long long ans=1;
for(int i = 1; i <= n; ++i){
ams*=i;
ans%=MOD
}
cout<<ans<<endl; | a.cc: In function 'int main()':
a.cc:10:9: error: 'ams' was not declared in this scope; did you mean 'ans'?
10 | ams*=i;
| ^~~
| ans
a.cc:11:17: error: expected ';' before '}' token
11 | ans%=MOD
| ^
| ;
12 | }
| ~
a.cc:13:17: error: expected '}' at end of input
13 | cout<<ans<<endl;
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s370952864 | p03796 | C++ | #include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
using namespace std;
int main(){
int n;
cin>>n;
long long ans=1;
for(int i = 1; i <= N; ++i){
ams*=i;
ans%=MOD
}
cout<<ans<<endl; | a.cc: In function 'int main()':
a.cc:9:25: error: 'N' was not declared in this scope
9 | for(int i = 1; i <= N; ++i){
| ^
a.cc:10:9: error: 'ams' was not declared in this scope; did you mean 'ans'?
10 | ams*=i;
| ^~~
| ans
a.cc:11:17: error: expected ';' before '}' token
11 | ans%=MOD
| ^
| ;
12 | }
| ~
a.cc:13:17: error: expected '}' at end of input
13 | cout<<ans<<endl;
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s869235084 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int N,ans=1;
const int MOD = 1e9+7;
cin>>N;
for(int i=1;i<N;++i){
ans *= i;
ans %= MDO;
}
cout<<ans<<endl;
} | a.cc: In function 'int main()':
a.cc:10:16: error: 'MDO' was not declared in this scope; did you mean 'MOD'?
10 | ans %= MDO;
| ^~~
| MOD
|
s138036744 | p03796 | C++ | #include <iostream>
using namespace std;
int main() {
int n, i = 1, power = 1;
cin >> n;
while (i <= n) {
power = power * i;
if (power >= 1000000007) power = power % 1000000007;
i++
}
cout << power;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:16: error: expected ';' before '}' token
10 | i++
| ^
| ;
11 | }
| ~
|
s497282563 | p03796 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
int N;
cin >> N;
int res = 1;
for (int i = 1; i <= N; ++i) {
res = i * res % (1e9 + 7);
}
cout << res << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:13:23: error: invalid operands of types 'int' and 'double' to binary 'operator%'
13 | res = i * res % (1e9 + 7);
| ~~~~~~~ ^ ~~~~~~~~~
| | |
| int double
|
s056266518 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b=1;
cin>>a;
for(int i=2;i<=a;i++){
b*=i;
b=b%1000000007
}
cout<<b<<endl;
} | a.cc: In function 'int main()':
a.cc:8:23: error: expected ';' before '}' token
8 | b=b%1000000007
| ^
| ;
9 | }
| ~
|
s687119990 | p03796 | C++ | #include <iostream>
#include <fstream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
using namespace boost::multiprecison;
cpp_int power(int p, int q){
cpp_int ret = p;
for(int i=1;i<q;i++){
ret *= p;
}
return ret;
}
int main(void){
int n = 0;
cin >> n;
cpp_int pow = 1;
for(int i=1;i<=n;i++){
pow *= i;
}
cout << pow % (7 + power(10,9)) << endl;
return 0;
} | a.cc:8:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
8 | #include <boost/multiprecision/cpp_int.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s310667588 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
long int i,array[200001]={},a,b=1,c;
string s;
cin>>a;
for(i=1;i<=a;i++){
b*=i;
b%=1000000007
}
cout<<b<<endl;
} | a.cc: In function 'int main()':
a.cc:11:18: error: expected ';' before '}' token
11 | b%=1000000007
| ^
| ;
12 | }
| ~
|
s511910497 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
long int i,array[200001]={},a,b=1,c;
string s;
cin>>a;
for(i=1;i<=a;i++){
b*=i;
b%=pow(10,9)+7;
}
cout<<b<<endl;
} | a.cc: In function 'int main()':
a.cc:11:6: error: invalid operands of types 'long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
11 | b%=pow(10,9)+7;
| ~^~~~~~~~~~~~~
a.cc:11:6: note: in evaluation of 'operator%=(long int, __gnu_cxx::__promote<double>::__type {aka double})'
|
s737286854 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
long i,array[200001]={},a,b=1,c;
string s;
cin>>a;
for(i=1;i<=a;i++){
b*=i;
b%=pow(10,9)+7;
}
cout<<b<<endl;
} | a.cc: In function 'int main()':
a.cc:11:6: error: invalid operands of types 'long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
11 | b%=pow(10,9)+7;
| ~^~~~~~~~~~~~~
a.cc:11:6: note: in evaluation of 'operator%=(long int, __gnu_cxx::__promote<double>::__type {aka double})'
|
s815688496 | p03796 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<string>
using namespace std;
typedef long long lng;
#define FOR(i,a,b) for(int i=(a); i<=(b); ++i)
#define FORD(i,b,a) for(int i=(b); i>=(a); --i)
#define REP(i,n) FOR(i,0,n-1)
#define ALL(a) (a).begin(), (a).end()
#define UNIQUE(a) a.erase(unique(ALL(a)), a.end()) //NOTE: <a> must be sorted in advance
lng power(lng b, lng n) {lng sol=1; while(n>0) {if(n&1) {sol=sol*b;} n>>=1; b*= b;} return sol;} //calculate b^n
const int MOD = 1000000007; //10^9+7
/*********** variables ************/
int N
/**********************************/
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
cin >> N;
lng now = 1;
FOR(i, 1, N) {
now *= i;
now %= MOD;
}
cout << now << endl;
}
| a.cc:22:1: error: expected initializer before 'int'
22 | int main() {
| ^~~
|
s834695736 | p03796 | C++ | #include <iostream>
using namespace std;
int main(){
int p = 1;
int N;
cin >> N;
for(int i = 1; i <= N; i++){
p *= i;
p %= e+9 + 7;
}
cout << p << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:10: error: 'e' was not declared in this scope
12 | p %= e+9 + 7;
| ^
|
s292333518 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int N;
int main(){
cin>>N;
ll cunt=1;
for(int i=1;i<=N;i++){
cunt*=i;
cunt%=(1000000000ll+7);
}
cout<<cunt<<"\n";
return 0;
} | a.cc: In function 'int main()':
a.cc:6:5: error: 'll' was not declared in this scope
6 | ll cunt=1;
| ^~
a.cc:8:9: error: 'cunt' was not declared in this scope
8 | cunt*=i;
| ^~~~
a.cc:11:11: error: 'cunt' was not declared in this scope
11 | cout<<cunt<<"\n";
| ^~~~
|
s030656250 | p03796 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
using namespace std;
using ll=long long
int main( void) {
int N=0;
ll wa=1e9+7;
ll power=1;
cin >> N;
for (int i=1; i<=N; i++){
power=power*i;
}
power=power%wa;
cout << power;
} | a.cc:9:4: error: expected ';' before 'main'
9 | int main( void) {
| ^~~~~
| ;
|
s601790666 | p03796 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
using namespace std;
int main( void) {
int N=0;
long wa=1e9+7
long power=1;
cin >> N;
for (int i=1; i<=N; i++){
power=(power*i)%wa;
}
power=power%wa;
cout << power;
} | a.cc: In function 'int main()':
a.cc:11:3: error: expected ',' or ';' before 'long'
11 | long power=1;
| ^~~~
a.cc:14:5: error: 'power' was not declared in this scope
14 | power=(power*i)%wa;
| ^~~~~
a.cc:16:3: error: 'power' was not declared in this scope
16 | power=power%wa;
| ^~~~~
|
s655365376 | p03796 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#define delta 10**9+7
using namespace std;
int main( void) {
int N=0;
int power=1;
cin >> N;
for (int i=1; i<=N; i++){
power=(power*i);
power=power%delta;
}
power=power%delta;
cout << power;
} | a.cc: In function 'int main()':
a.cc:6:18: error: invalid type argument of unary '*' (have 'int')
6 | #define delta 10**9+7
| ^~
a.cc:15:17: note: in expansion of macro 'delta'
15 | power=power%delta;
| ^~~~~
a.cc:6:18: error: invalid type argument of unary '*' (have 'int')
6 | #define delta 10**9+7
| ^~
a.cc:17:15: note: in expansion of macro 'delta'
17 | power=power%delta;
| ^~~~~
|
s491390196 | p03796 | C++ | #include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
int ans=1;
for(int i=1;i<=n;i++) ans=(ans*i)%1000000007
cout<<ans;
} | a.cc: In function 'int main()':
a.cc:7:49: error: expected ';' before 'cout'
7 | for(int i=1;i<=n;i++) ans=(ans*i)%1000000007
| ^
| ;
8 |
9 | cout<<ans;
| ~~~~
|
s059808964 | p03796 | C++ | #include<iostream>
using namespace std;
int main(){
int n;
cin >> n;
int p = 1,;
for(int i=1; n >= i; i++){
p = (p*i)%1000000007;
}
cout << p << endl;
} | a.cc: In function 'int main()':
a.cc:7:13: error: expected unqualified-id before ';' token
7 | int p = 1,;
| ^
|
s286506957 | p03796 | C++ | #include<iostream>
using namespace std;
int main() {
int N;
cin >> N;
unsigned long power = 1;
unsigned long div = std::pow(10.0, 9) + 7;
for (unsigned long i = 1; i <= N; ++i) power = i * power % div;
cout << power << endl;
} | a.cc: In function 'int main()':
a.cc:8:34: error: 'pow' is not a member of 'std'
8 | unsigned long div = std::pow(10.0, 9) + 7;
| ^~~
|
s375485443 | p03796 | C++ | #include<iostream>
using namespace std;
int main() {
int N;
cin >> N;
unsigned long power = 1;
unsigned long div = pow(10.0, 9) + 7;
for (unsigned long i = 1; i <= N; ++i) power = i * power % div;
cout << power << endl;
} | a.cc: In function 'int main()':
a.cc:8:29: error: 'pow' was not declared in this scope; did you mean 'power'?
8 | unsigned long div = pow(10.0, 9) + 7;
| ^~~
| power
|
s747329845 | p03796 | C++ | #include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int total;
for(int i = 1; i <= N; i++){
total = total*i
}
int ans = total%(10^9+7)
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:9:21: error: expected ';' before '}' token
9 | total = total*i
| ^
| ;
10 | }
| ~
a.cc:13:5: error: expected ',' or ';' before 'cout'
13 | cout << ans << endl;
| ^~~~
|
s622039872 | p03796 | C++ | use std::env;
use std::io::*;
use std::str::*;
use std::mem;
use std::collections::HashMap;
fn read<T: FromStr>() -> T {
let stdin = stdin();
let s = stdin.bytes().map(|c| c.unwrap() as char)
.skip_while(|c| c.is_whitespace())
.take_while(|c| !c.is_whitespace())
.collect::<String>();
s.parse::<T>().ok().unwrap()
}
fn read_char() -> char {
let c = read::<String>();
let c = c.chars().collect::<Vec<char>>();
c[0]
}
fn read_String_Vec() -> Vec<char> {
let S = read::<String>();
S.chars().collect::<Vec<char>>()
}
fn vecchar_to_String(Vs: Vec<char>) -> String {
let mut S = String::new();
for i in 0..Vs.len() {
S.push(Vs[i]);
}
S
}
/*
A : 65
Z : 90
a : 97
z : 122
*/
/*
let N = read::<i32>();
let S = read::<String>();
let S = read_String_Vec();
let C = read_char();
*/
/*
.to_string() : * -> String
&*S : String -> &str
*/
fn main() {
// main の引数
/*
引数なしのときargs.len() = 1;
*/
let args: Vec<String> = env::args().collect();
let N = read::<i64>();
let mut mpl = 1;
for i in 0..N {
mpl = (mpl * (i+1)) % 1000000007;
}
println!("{}", mpl%1000000007);
}
| a.cc:27:14: error: too many decimal points in number
27 | for i in 0..Vs.len() {
| ^~~~~~~~~
a.cc:61:14: error: too many decimal points in number
61 | for i in 0..N {
| ^~~~
a.cc:1:1: error: 'use' does not name a type
1 | use std::env;
| ^~~
a.cc:2:1: error: 'use' does not name a type
2 | use std::io::*;
| ^~~
a.cc:3:1: error: 'use' does not name a type
3 | use std::str::*;
| ^~~
a.cc:4:1: error: 'use' does not name a type
4 | use std::mem;
| ^~~
a.cc:5:1: error: 'use' does not name a type
5 | use std::collections::HashMap;
| ^~~
a.cc:7:1: error: 'fn' does not name a type
7 | fn read<T: FromStr>() -> T {
| ^~
a.cc:15:1: error: 'fn' does not name a type
15 | fn read_char() -> char {
| ^~
a.cc:20:1: error: 'fn' does not name a type
20 | fn read_String_Vec() -> Vec<char> {
| ^~
a.cc:25:1: error: 'fn' does not name a type
25 | fn vecchar_to_String(Vs: Vec<char>) -> String {
| ^~
a.cc:52:1: error: 'fn' does not name a type
52 | fn main() {
| ^~
|
s900799273 | p03796 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int c = sc.nextInt();
long a=1;
long x=1;
for(int i=0;i<9;i++) {
x *=10;
}
for(int i=1;i<=c;i++) {
a = a*i;
a = a % (x+7);
}
System.out.print(a);
sc.close();
}
}
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int c = sc.nextInt();
long a=1;
long x=1;
for(int i=0;i<9;i++) {
x *=10;
}
for(int i=1;i<=c;i++) {
a = a*i;
a = a % (x+7);
}
System.out.print(a);
sc.close();
}
}
| Main.java:19: error: class, interface, enum, or record expected
import java.util.*;
^
1 error
|
s421453864 | p03796 | C++ | //#include "bits\stdc++.h"
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
typedef long long LL;
int main()
{
int n;
long int a, p = 1;
cin >> n;
for (int i = 0; i < n; ++i)
{
p *= (i + 1);
}
a = pow(10, 9);
cout << p % (a + 7)<< endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:23:9: error: 'pow' was not declared in this scope
23 | a = pow(10, 9);
| ^~~
|
s455076252 | p03796 | C++ | #include<iostream>
#include<stdint>
using namespace std;
const int MOD = 1000000007;
int main() {
int N;
cin >> N;
int64_t power = 1;
for (int i = 2;i <= N;i ++) power = power * i % MOD;
cout << power;
return 0;
}
/*
31536000のコメント解説欄
ここテンプレで用意してるから、A問題とかだとこの先空欄の危険あり
総積のmodはmodの総積に等しいので、毎回modすればいい
ちなみに、10^9+7は素数なので、これを利用した定理(逆元をフェルマーの小定理から求める等)には注意ね
*/ | a.cc:2:9: fatal error: stdint: No such file or directory
2 | #include<stdint>
| ^~~~~~~~
compilation terminated.
|
s403100115 | p03796 | C++ | #include<iostream>
using namespace std;
const int mod=10e9+7;
typedef long long ll;
int main(){
int N;
ll ans=1;
cin>>N;
for(int i=1;i<=N,i++) ans*=i;
cout<<(N%mod)<<endl;
} | a.cc:3:19: warning: overflow in conversion from 'double' to 'int' changes value from '1.0000000007e+10' to '2147483647' [-Woverflow]
3 | const int mod=10e9+7;
| ~~~~^~
a.cc: In function 'int main()':
a.cc:10:29: error: expected ';' before ')' token
10 | for(int i=1;i<=N,i++) ans*=i;
| ^
| ;
|
s946842656 | p03796 | C++ | #include<iostream>
const int mod=10e9+7;
typedef long long ll;
int main(){
int N;
ll ans=1;
cin>>N;
for(int i=1;i<=N,i++) ans*=i;
cout<<(N%mod)<<endl;
} | a.cc:2:19: warning: overflow in conversion from 'double' to 'int' changes value from '1.0000000007e+10' to '2147483647' [-Woverflow]
2 | const int mod=10e9+7;
| ~~~~^~
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
8 | cin>>N;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:9:29: error: expected ';' before ')' token
9 | for(int i=1;i<=N,i++) ans*=i;
| ^
| ;
a.cc:10:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
10 | cout<<(N%mod)<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:10:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
10 | cout<<(N%mod)<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s034767928 | p03796 | C++ | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
void mul_mod(ll& a, ll b){
a *= b;
a %= MOD;
}
int main(void){
ll i,n,ans=1ll;
cin >> n;
for(i=1ll; i<=n; ++i){
mul_mod(ans,i);
}
cout << ans << endl;
return 0;
} | a.cc: In function 'void mul_mod(ll&, ll)':
a.cc:7:14: error: 'MOD' was not declared in this scope
7 | a %= MOD;
| ^~~
|
s670459232 | p03796 | C++ | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
int main(void){
ll i,n,ans=1ll;
cin >> n;
for(i=1ll; i<=n; ++i){
mul_mod(ans,i);
}
cout << ans << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:17: error: 'mul_mod' was not declared in this scope
8 | mul_mod(ans,i);
| ^~~~~~~
|
s114708569 | p03796 | C++ | #include<iostream>
#include<vector>
#define REP(m,n) for(int i=m;i<n;i++)
using namespace std;
int main(){
long long int pow=1,N;
cin>>N;
for(i=0;i<N;i++){
pow=pow*(i+1);
}
cout<<pow%1000000007<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:14: error: 'i' was not declared in this scope
8 | for(i=0;i<N;i++){
| ^
|
s308432113 | p03796 | C++ | #include<iostream>
#include<vector>
#define REP(m,n) for(int i=m;i<n;i++)
using namespace std;
int main(){
long long int pow=1,N;
cin>>https://abc055.contest.atcoder.jp/tasks/abc055_bN;
REP(0,N) pow=pow*i;
cout<<pow%1000000007<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:7: error: 'https' was not declared in this scope
7 | cin>>https://abc055.contest.atcoder.jp/tasks/abc055_bN;
| ^~~~~
a.cc:3:30: error: 'i' was not declared in this scope
3 | #define REP(m,n) for(int i=m;i<n;i++)
| ^
a.cc:8:2: note: in expansion of macro 'REP'
8 | REP(0,N) pow=pow*i;
| ^~~
|
s644364617 | p03796 | C++ | #include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <time.h>
#include <vector>
//#include <random>
//#include <unordered_set>
#include <complex>
using namespace std; //设10的9次方+7=a;
int main() //算n的阶乘,每当n的阶乘超过a时,都把n的阶乘%一下a,每次%掉的数肯定是a的整数倍,就算每次%掉的数还乘了下一个数,
{ //甚至一直乘下去,最后总要%,也会一起%掉的,为避免溢出,所以如此做;每次%不掉的部分最后还是一样留下来
long long n,i,ans=1; //
cin>>n; //
for(i=2;i<=n;i++) //--------------
{
ans*=i;
if(ans>cnt) ans%=1000000007;
}
cout<<ans;
system ("pause");
return 0;
} | a.cc: In function 'int main()':
a.cc:29:16: error: 'cnt' was not declared in this scope; did you mean 'int'?
29 | if(ans>cnt) ans%=1000000007;
| ^~~
| int
|
s145892503 | p03796 | C++ | #include <iostream>
#include <string>
#include <string.h>
#include <map>
#include <set>
#include <vector>
#include <stdio.h>
#include <math.h>
#include <algorithm>
#include <queue>
#include <cmath>
#include <cstdio>
using namespace std;
int main(){
int n;
cin>>n;
int ans=1;
for(int i=1;i<=n;i++)
ans*=i;
cout<<ans%1000000007
system("pause");
return 0;
} | a.cc: In function 'int main()':
a.cc:20:21: error: expected ';' before 'system'
20 | cout<<ans%1000000007
| ^
| ;
21 | system("pause");
| ~~~~~~
|
s151807535 | p03796 | C++ | #include <iostream>
#include<string>
#include <cmath>
using namespace std;
int main()
{
long double ans=1,n;
cin>>n;
for(int i=1;i<=n;i++){
ans*=i;
ans%=1000000007;}
cout<<ans<<endl;
system("pause");
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:8: error: invalid operands of types 'long double' and 'int' to binary 'operator%'
11 | ans%=1000000007;}
| ~~~^~~~~~~~~~~~
a.cc:11:8: note: in evaluation of 'operator%=(long double, int)'
|
s303587195 | p03796 | C++ | #include <iostream>
#include<string>
#include <cmath>
using namespace std;
int main()
{
long double ans=1,n,a=1;
cin>>n;
for(int i=1;i<=n;i++){
ans*=a;
a++;}
ans%=1000000007;
cout<<ans<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:8: error: invalid operands of types 'long double' and 'int' to binary 'operator%'
12 | ans%=1000000007;
| ~~~^~~~~~~~~~~~
a.cc:12:8: note: in evaluation of 'operator%=(long double, int)'
|
s464755360 | p03796 | C++ | #include<string>
#include<string.h>
#include<map>
#include<set>
#include<vector>
#include<stdio.h>
#include<math.h>
#include<iostream>
#include<algorithm>
#include<queue>
using namespace std;
int main()
{
long long n,m;
cin>>n>>m;
if(n*2=m)
cout<<n;
if(n*2>m)
cout<<m/2;
if(n*2<m)
cout<<n+(m-(n*2))/4;
return 0;
}
| a.cc: In function 'int main()':
a.cc:20:9: error: lvalue required as left operand of assignment
20 | if(n*2=m)
| ~^~
|
s260002259 | p03796 | C++ | #include<iostream>
usin namespace std;
int main()
{
int n;
const long long big=1000000007;
cin>>n;
long long ans=n;
for(int i=1;i<=n;i++)
ans*=i;
if(ans>big)
cout<<ans/big;
else
cout<<ans; | a.cc:2:1: error: 'usin' does not name a type
2 | usin namespace std;
| ^~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>n;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:12:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
12 | cout<<ans/big;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:14:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
14 | cout<<ans;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:14:11: error: expected '}' at end of input
14 | cout<<ans;
| ^
a.cc:4:1: note: to match this '{'
4 | {
| ^
|
s497054518 | p03796 | C++ | #include <iostream>
#include <string>
int main() {
long long S,A=1;
std::cin >> S;
for (int i = 1; i <= S; i++){
A=A*i;
A=A % 1000000007;
}
std::cout << A%1000000007 << std::endl;
| a.cc: In function 'int main()':
a.cc:10:48: error: expected '}' at end of input
10 | std::cout << A%1000000007 << std::endl;
| ^
a.cc:3:12: note: to match this '{'
3 | int main() {
| ^
|
s095556976 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
struct edge {int /*from,*/to,cost;};
typedef long long ll;
typedef pair<int,int> P;
typedef pair<pair<int,int>,int> PP;
typedef vector<int> VI;
typedef vector<long long int> VL;
typedef vector<edge> VE;
static const int MOD = 1000000007;
static const int INF = 2147483647;
//static const long long INF = 9223372000000000000;
//static const long long INF = 9223372000000000000/2;
//static const int INF = 1000010000;
//int dx4[4] = {0,1,0,-1}, dy4[4] = {-1,0,1,0};
//int dx5[5] = {-1,0,0,0,1}, dy5[5] = {0,-1,0,1,0};
//int dx8[8] = {-1,0,1,1,1,0,-1,-1}, dy8[8] = {1,1,1,0,-1,-1,-1,0};
//int dx9[9] = {-1,0,1,1,1,0,-1,-1,0}, dy9[9] = {1,1,1,0,-1,-1,-1,0,0};
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define np next_permutation
#define pq priority_queue
#define SZ(a) int((a).size())
#define LEN(a) int((a).length())
#define MAX(a,b,c) max((a),max((b),(c)))
#define MIN(a,b,c) min((a),min((b),(c)))
#define SORT(c) sort((c).begin(),(c).end())
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,x) for(int i=0;i<(int)(x);i++)
#define REP1(i,x) for(int i=1;i<=(int)(x);i++)
#define RREP(i,x) for(int i=((int)(x)-1);i>=0;i--)
#define RREP1(i,x) for(int i=((int)(x));i>0;i--)
//#define int ll
int fact[114514];
void fact(){
fact[0] = fact[1] = 1;
REP1(i,114513){
fact[i] = (fact[i-1] * i) % MOD;
}
}
signed main(){
int n;
f();
printf("%d\n",fact[n]);
return 0;
} | a.cc:41:11: error: 'void fact()' redeclared as different kind of entity
41 | void fact(){
| ^
a.cc:39:5: note: previous declaration 'int fact [114514]'
39 | int fact[114514];
| ^~~~
a.cc: In function 'int main()':
a.cc:50:5: error: 'f' was not declared in this scope
50 | f();
| ^
|
s161086185 | p03796 | C++ | #include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <iostream>
using namespace std;
int main(){
int N;
scanf("%d",&N);
long long p=1;
for(int i=1;i<=N;i++){
p=p*i
}
p=p%1000000007;
printf("%lld\n",p);
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:10: error: expected ';' before '}' token
12 | p=p*i
| ^
| ;
13 | }
| ~
|
s152807957 | p03796 | C++ | #include <iostream>
int N;
int main(){
long long p = 1;
std::cin >> N;
for(int i = 1; i <= N; ++i) sum = sum * i % 1000000007;
std::cout << sum << std::endl;
} | a.cc: In function 'int main()':
a.cc:6:29: error: 'sum' was not declared in this scope
6 | for(int i = 1; i <= N; ++i) sum = sum * i % 1000000007;
| ^~~
a.cc:7:14: error: 'sum' was not declared in this scope
7 | std::cout << sum << std::endl;
| ^~~
|
s365704089 | p03796 | C++ | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long N = sc.nextInt();
long power = 1;
for(int a=1;a<=N;a++){
power = (power*a)%1000000007;
}
System.out.println(power);
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main{
| ^~~~~~
|
s467454218 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, n) for(int i = 0; i < (n); i++)
#define MEM(a, x) memset(a, x, sizeof(a))
#define ALL(a) a.begin(), a.end()
#define UNIQUE(a) a.erase(unique(ALL(a)), a.end())
typedef long long ll;
int n, MOD = 1000000007;
int main(int argc, char const *argv[]) {
ios_base::sync_with_stdio(false);
int x = 1;
FOR(int i = 1; i <= n; i++) x = x * i % MOD;
cout << x << endl;
return 0;
} | a.cc:14:35: error: macro "FOR" requires 2 arguments, but only 1 given
14 | FOR(int i = 1; i <= n; i++) x = x * i % MOD;
| ^
a.cc:3:9: note: macro "FOR" defined here
3 | #define FOR(i, n) for(int i = 0; i < (n); i++)
| ^~~
a.cc: In function 'int main(int, const char**)':
a.cc:14:9: error: 'FOR' was not declared in this scope
14 | FOR(int i = 1; i <= n; i++) x = x * i % MOD;
| ^~~
|
s378966496 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define MOD 1000000007
signed main(){
int n;
cin>>n;
int ans=1;
for(int i=1;i<=n;i++){
ans*=n;
ans%=MOD;
}
cout<<ans<<endl
return 0;
} | a.cc: In function 'int main()':
a.cc:14:20: error: expected ';' before 'return'
14 | cout<<ans<<endl
| ^
| ;
15 | return 0;
| ~~~~~~
|
s307024982 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define MOD 1e9+7
int pow(int n){
if(n==1)return 1;
return (n*pow(n-1))%MOD;
}
signed main(){
int n;
cin>>n;
cout<<pow(n)<<endl;
return 0;
} | a.cc: In function 'long long int pow(long long int)':
a.cc:7:24: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
7 | return (n*pow(n-1))%MOD;
| ~~~~~~~~~~~~^
| |
| long long int
|
s519689387 | p03796 | C++ | if __name__ == "__main__":
N = int(input())
res = 1
MOD = 10 ** 9 + 7
for i in range(1, N + 1):
res *= i
res %= MOD
print (res)
| a.cc:1:1: error: expected unqualified-id before 'if'
1 | if __name__ == "__main__":
| ^~
|
s018523049 | p03796 | C++ | include <iostream>
using namespace std;
#define SURPLUS 1000000009
int main(void){
int N;
cin >> N;
int tmp = 1;
for(int i = 0; i < N; i++){
tmp *= 1;
tmp = tmp % SURPLUS;
}
cout << tmp << end;
return 0;
}
| a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
8 | cin >> N;
| ^~~
a.cc:15:5: error: 'cout' was not declared in this scope
15 | cout << tmp << end;
| ^~~~
a.cc:15:20: error: 'end' was not declared in this scope
15 | cout << tmp << end;
| ^~~
|
s921214972 | p03796 | C++ | #include<iostream>
using namespace std;
int main()
{
int n;
cin>>n;
cout<<n!/1000000007)<<endl;
} | a.cc: In function 'int main()':
a.cc:12:16: error: expected ';' before '!' token
12 | cout<<n!/1000000007)<<endl;
| ^
| ;
|
s593618125 | p03796 | C++ | #include "stdafx.h"
#include<iostream>
using namespace std;
int main()
{
long long A,B=1;
cin >> A;
for (long long i = 1; i <= A; i++)
{
B = B*i % 1000000007;
}
cout << B << endl;
return 0;
}
| a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s774755725 | p03796 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
int A;
int X=1;
cin>>A;
for(i=1;i<=A;i++){
X=i*X;
}
cout<<X%1000000007<<endl;
return 0
} | a.cc: In function 'int main()':
a.cc:9:6: error: 'i' was not declared in this scope
9 | for(i=1;i<=A;i++){
| ^
a.cc:13:9: error: expected ';' before '}' token
13 | return 0
| ^
| ;
14 | }
| ~
|
s576019453 | p03796 | C++ | N = int(input())
m = 1
for i in range (1,N+1):
m = m*i
m = m%1000000007
print(m) | a.cc:1:1: error: 'N' does not name a type
1 | N = int(input())
| ^
|
s376583577 | p03796 | Java |
import java.util.Scanner;
public class Main {
Scanner sc = new Scanner(System.in);
int n=sc.nextInt();
int j=1;
int i=1;
for(i=1;i<=n;i++){
j=j*i%(10^9+7);}
System.out.println(j);
}
| Main.java:9: error: illegal start of type
for(i=1;i<=n;i++){
^
Main.java:9: error: <identifier> expected
for(i=1;i<=n;i++){
^
Main.java:9: error: <identifier> expected
for(i=1;i<=n;i++){
^
Main.java:9: error: <identifier> expected
for(i=1;i<=n;i++){
^
Main.java:9: error: <identifier> expected
for(i=1;i<=n;i++){
^
Main.java:11: error: <identifier> expected
System.out.println(j);
^
Main.java:11: error: <identifier> expected
System.out.println(j);
^
7 errors
|
s967023172 | p03796 | C++ |
#include <iostream>
#include<math.h>
int main() {
long long N;
std::cin >> N;
long long power = 1;
for(long long i = 1; i <= N; i++){
power = (power * N) % ((long long)pow(10, 9) + 7)
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:54: error: expected ';' before '}' token
9 | power = (power * N) % ((long long)pow(10, 9) + 7)
| ^
| ;
10 | }
| ~
|
s591371210 | p03796 | C++ |
#include <iostream>
int int main() {
long long N;
std::cin >> N;
long long power = 1;
for(long long i = 1; i <= N; i++){
power = (power * N) % (pow(10, 9) + 7)
}
return 0;
}
| a.cc:3:1: error: two or more data types in declaration of 'main'
3 | int int main() {
| ^~~
|
s822892162 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int ,int> P;
template < typename T > inline string toString( const T &a ) { ostringstream oss; oss << a; return oss.str(); };
#define mod 1e9+7
int main(){
ll n;
cin>>n;
double ans=1;
for(int i=2;i<=n;i++) ans=(ans*i)%mod;
cout<<ans<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:34: error: invalid operands of types 'double' and 'double' to binary 'operator%'
11 | for(int i=2;i<=n;i++) ans=(ans*i)%mod;
| ~~~~~~~^
| |
| double
|
s748905044 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int ,int> P;
template < typename T > inline string toString( const T &a ) { ostringstream oss; oss << a; return oss.str(); };
#define mod 1e9+7
int main(){
ll n;
cin>>n;
ll ans=1;
for(int i=2;i<=n;i++) ans=(ans*i)%mod;
cout<<ans<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:34: error: invalid operands of types 'll' {aka 'long long int'} and 'double' to binary 'operator%'
11 | for(int i=2;i<=n;i++) ans=(ans*i)%mod;
| ~~~~~~~^
| |
| ll {aka long long int}
|
s560147448 | p03796 | C++ | #include <iostream>
#include <cmath>
using namespace std;
int main(void) {
int n, m=1;
cin >> n;
for(int i=0;i<n;i++) {
m = (m * i+1) % (pow(10, 9) + 7);
}
cout << m << endl;
} | a.cc: In function 'int main()':
a.cc:8:23: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
8 | m = (m * i+1) % (pow(10, 9) + 7);
| ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
| | |
| int __gnu_cxx::__promote<double>::__type {aka double}
|
s402788711 | p03796 | C++ | #include<stdio.h>
#include<string.h>
#define maxn 1000000007
main()
{
int i,j;
__int64 n,s;
while(scanf("%I64d",&n)!=EOF)
{s=1;
for(i=1;i<=n;i++)
{s=s*i;
s=s%maxn;
}
printf("%I64d\n",s%maxn);
}
}
| a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main()
| ^~~~
a.cc: In function 'int main()':
a.cc:7:5: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
7 | __int64 n,s;
| ^~~~~~~
| __int64_t
a.cc:8:26: error: 'n' was not declared in this scope
8 | while(scanf("%I64d",&n)!=EOF)
| ^
a.cc:9:6: error: 's' was not declared in this scope
9 | {s=1;
| ^
|
s835401863 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[])
{
unsigned __int64 power = 1;
int N;
cin >> N;
for(int i = 1; i <= N; ++i)
power = i * power % 1000000007;
cout << power << flush;
return 0;
}
| a.cc: In function 'int main(int, const char**)':
a.cc:6:20: error: expected initializer before 'power'
6 | unsigned __int64 power = 1;
| ^~~~~
a.cc:10:5: error: 'power' was not declared in this scope
10 | power = i * power % 1000000007;
| ^~~~~
a.cc:11:11: error: 'power' was not declared in this scope
11 | cout << power << flush;
| ^~~~~
|
s186852171 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[])
{
unsigned __int64 power = 1;
int N;
cin >> N;
for(int i = 1; i <= N; ++i)
power = i * power % 1000000007;
cout << power << flush;
return 0;
}
| a.cc: In function 'int main(int, const char**)':
a.cc:6:20: error: expected initializer before 'power'
6 | unsigned __int64 power = 1;
| ^~~~~
a.cc:10:5: error: 'power' was not declared in this scope
10 | power = i * power % 1000000007;
| ^~~~~
a.cc:11:11: error: 'power' was not declared in this scope
11 | cout << power << flush;
| ^~~~~
|
s187359941 | p03796 | C | #include <stdio.h>
#include <stdlib.h>
int main()
{
__int64 s = 1;
int i,x;
scanf("%d",&x);
for(i = 1;i <=x;i++)
{
s *=i;
if(s>=1000000007)
s %=1000000007;
}
printf("%I64d\n",s);
return 0;
}
| main.c: In function 'main':
main.c:6:5: error: unknown type name '__int64'; did you mean '__int64_t'?
6 | __int64 s = 1;
| ^~~~~~~
| __int64_t
|
s564522671 | p03796 | C | #include <stdio.h>
#include <stdlib.h>
int main()
{
int n,i;
while(scanf("%d",&n)!=EOF)
{
__int64 sum=1;
for(i=1;i<=n;i++)
{
sum=(i*sum)%1000000007;
}
printf("%I64d\n",sum);
}
return 0;
}
| main.c: In function 'main':
main.c:9:9: error: unknown type name '__int64'; did you mean '__int64_t'?
9 | __int64 sum=1;
| ^~~~~~~
| __int64_t
|
s743703267 | p03796 | C | #include<stdio.h>
int main()
{
__int64 i,j=1e9+7,l,k;
while(~scanf("%I64d",&l))
{
k=1;
for(i=1;i<=l;i++)
k=k*i%j;
printf("%I64d\n",k);
}
return 0;
}
| main.c: In function 'main':
main.c:4:5: error: unknown type name '__int64'; did you mean '__int64_t'?
4 | __int64 i,j=1e9+7,l,k;
| ^~~~~~~
| __int64_t
|
s444497446 | p03796 | C | #include <stdio.h>
int main()
{
int n,i;
long long sum;
scanf("%d",&n);
if(n == 1)
{
printf("1\n");
}
else
{
for(i = 1,s0um = 1; i <= n; i++)
sum =(sum % (1000000000+7)) * (i %(1000000000+7));
printf("%lld\n",sum%(1000000000+7));
}
return 0;
}
| main.c: In function 'main':
main.c:13:19: error: 's0um' undeclared (first use in this function); did you mean 'sum'?
13 | for(i = 1,s0um = 1; i <= n; i++)
| ^~~~
| sum
main.c:13:19: note: each undeclared identifier is reported only once for each function it appears in
|
s089412076 | p03796 | C | #include <stdio.h>
int main()
{
int n,i;
__int64 sum;
scanf("%d",&n);
if(n == 1)
{
printf("1\n");
}
else
{
for(i = 1,sum = 1; i <= n; i++)
sum =(sum % (1000000000+7)) * (i %(1000000000+7));
printf("%I64d\n",sum%(1000000000+7));
}
return 0;
}
| main.c: In function 'main':
main.c:5:5: error: unknown type name '__int64'; did you mean '__int64_t'?
5 | __int64 sum;
| ^~~~~~~
| __int64_t
|
s268032715 | p03796 | Java | public class Main2{
public static void main(String[] args){
int n = new java.util.Scanner(System.in).nextInt();
int pow = 1;
for (int i=1; i<=n; i++){
pow = i*pow%1000000007;
}
System.out.println(pow);
}
} | Main.java:1: error: class Main2 is public, should be declared in a file named Main2.java
public class Main2{
^
1 error
|
s161894499 | p03796 | Java | package spring;
public class atcoder {
public static void main(String[] args){
int n=10,i,a=1;
for(i=1;i<n+1;i++){
a=a*i;
}
System.out.println(a);
}
}
| Main.java:3: error: class atcoder is public, should be declared in a file named atcoder.java
public class atcoder {
^
1 error
|
s126720831 | p03796 | Java | package spring;
public class atcoder {
public static void main(String[] args){
int n=10,i,a=1;
for(i=1;i<n+1;i++){
a=a*i;
}
System.out.println(a);
}
}
| Main.java:3: error: class atcoder is public, should be declared in a file named atcoder.java
public class atcoder {
^
1 error
|
s752404579 | p03796 | Java | import java.util.Scanner;
public class TrainingCamp {
public static void main(String[] args) {
Scanner a = new Scanner(System.in);
int N = a.nextInt();
double power = 1;
for(int i = 1; i <= N; i++){
power = (power * i) % 100000000+7;
}
System.out.println(power);
}
} | Main.java:3: error: class TrainingCamp is public, should be declared in a file named TrainingCamp.java
public class TrainingCamp {
^
1 error
|
s083170255 | p03796 | Java | import java.util.Scanner;
public class TrainingCamp {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
long power = 1;
for(int i = 1; i <= N; i++) {
power = (power * (long)i) % 1000000007;
}
System.out.println(power);
}
} | Main.java:3: error: class TrainingCamp is public, should be declared in a file named TrainingCamp.java
public class TrainingCamp {
^
1 error
|
s755479968 | p03796 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
long ans = ;
long a = (long)(Math.pow(10, 9) + 7);
for(int i = 0; i <= n; i++){
ans = i * ans % a;
}
System.out.println(ans);
}
} | Main.java:7: error: illegal start of expression
long ans = ;
^
1 error
|
s906885460 | p03796 | C++ | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
long ans = 0;
long a = (long)(Math.pow(10, 9) + 7);
for(int i = 0; i < n; i++){
ans = i * ans % a;
}
System.out.println(ans);
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s555747286 | p03796 | C++ | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
long ans = 0;
long a = (long)(Math.pow(10, 9) + 7);
for(int i = 0; i < n; i++){
ans = i * ans % a;
}
System.out.println(ans);
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s314037153 | p03796 | C++ | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
long ans = 0;
long a = (long)(Math.pow(10, 9) + 7);
for(int i = 0; i < n; i++){
ans = i * ans % a;
}
System.out.println(ans);
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s409381700 | p03796 | C++ | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
long ans = 0, a;
a = (long)(Math.pow(10, 9) + 7);
for(int i = 0; i < n; i++){
ans = i * ans % a;
}
System.out.println(ans);;
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s774114848 | p03796 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int i;
double pow=1;
double ans = 1;
for(i = 1; i <= N; i++){
pow = pow * i;
ans = pow %(Math.pow(10.0,9.0)+7.0);
}
pow = ans;
System.out.println((int)ans);
}
}
| Main.java:1: error: illegal character: '\u00a0'
import java.util.*;?
^
1 error
|
s114359426 | p03796 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int i;
double pow=1;
double ans = 1;
for(i = 1; i < N; i++){
pow = pow * i;
ans = pow %(Math.pow(10.0,9.0)+7.0);
}
pow = ans;
System.out.println((int)ans);
}
}
| Main.java:1: error: illegal character: '\u00a0'
import java.util.*;?
^
1 error
|
s618130582 | p03796 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int i;
double pow=1;
double ans = 1;
for(i = 1; i < N; i++){
pow = pow * i;
ans = pow %(Math.pow(10.0,9.0)+7.0);
}
pow = ans;
System.out.println((int)ans);
}
}
| Main.java:1: error: illegal character: '\u00a0'
import java.util.*;?
^
Main.java:15: error: illegal character: '\u00a0'
?
^
2 errors
|
s843190633 | p03796 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int i;
double pow=1;
double ans = 1;
for(i = 1; i < N; i++){
pow = pow * i;
ans = pow %(Math.pow(10.0,9.0)+7.0);
pow = ans;
}
System.out.println((int)ans);
}
}
| Main.java:1: error: illegal character: '\u00a0'
import java.util.*;?
^
Main.java:15: error: illegal character: '\u00a0'
?
^
2 errors
|
s570495493 | p03796 | Java | 2. import java.util.*;
3.
4. public class Main {
5. public static void main(String[] args){
6. Scanner sc = new Scanner(System.in);
7. int N = sc.nextInt();
8. int i;
9. double pow=1;
10. double ans = 1;
11. for(i = 1; i < N; i++){
12. pow = pow * i;
13. double ans = pow %(Math.pow(10.0,9.0)+7.0);
14. }
15. System.out.println((int)ans);
16.
17. }
18. }
| Main.java:1: error: class, interface, enum, or record expected
2. import java.util.*;
^
Main.java:2: error: class, interface, enum, or record expected
3. ?
^
Main.java:2: error: illegal character: '\u00a0'
3. ?
^
Main.java:4: error: illegal start of type
5. public static void main(String[] args){
^
Main.java:5: error: not a statement
6. Scanner sc = new Scanner(System.in);
^
Main.java:5: error: ';' expected
6. Scanner sc = new Scanner(System.in);
^
Main.java:6: error: not a statement
7. int N = sc.nextInt();
^
Main.java:6: error: ';' expected
7. int N = sc.nextInt();
^
Main.java:7: error: not a statement
8. int i;
^
Main.java:7: error: ';' expected
8. int i;
^
Main.java:8: error: not a statement
9. double pow=1;
^
Main.java:8: error: ';' expected
9. double pow=1;
^
Main.java:9: error: not a statement
10. double ans = 1;
^
Main.java:9: error: ';' expected
10. double ans = 1;
^
Main.java:10: error: not a statement
11. for(i = 1; i < N; i++){
^
Main.java:10: error: ';' expected
11. for(i = 1; i < N; i++){
^
Main.java:11: error: not a statement
12. pow = pow * i;
^
Main.java:11: error: ';' expected
12. pow = pow * i;
^
Main.java:12: error: not a statement
13. double ans = pow %(Math.pow(10.0,9.0)+7.0);
^
Main.java:12: error: ';' expected
13. double ans = pow %(Math.pow(10.0,9.0)+7.0);
^
Main.java:13: error: not a statement
14. }
^
Main.java:13: error: ';' expected
14. }
^
Main.java:14: error: not a statement
15. System.out.println((int)ans);
^
Main.java:14: error: ';' expected
15. System.out.println((int)ans);
^
Main.java:15: error: illegal character: '\u00a0'
16. ?
^
Main.java:15: error: not a statement
16. ?
^
Main.java:17: error: illegal start of type
18. }
^
27 errors
|
s578461333 | p03796 | Java | 2. import java.util.*;
3.
4. public class Main {
5. public static void main(String[] args){
6. Scanner sc = new Scanner(System.in);
7. int N = sc.nextInt();
8. int i;
9. double pow=1;
10. double ans = 1;
11. for(i = 1; i < N; i++){
12. pow = pow * i;
13. double ans = (double)pow % (Math.pow(10.0,9.0)+7.0);
14. }
15. System.out.println((int)ans);
16.
17. }
18. }
| Main.java:1: error: class, interface, enum, or record expected
2. import java.util.*;
^
Main.java:2: error: class, interface, enum, or record expected
3. ?
^
Main.java:2: error: illegal character: '\u00a0'
3. ?
^
Main.java:4: error: illegal start of type
5. public static void main(String[] args){
^
Main.java:5: error: not a statement
6. Scanner sc = new Scanner(System.in);
^
Main.java:5: error: ';' expected
6. Scanner sc = new Scanner(System.in);
^
Main.java:6: error: not a statement
7. int N = sc.nextInt();
^
Main.java:6: error: ';' expected
7. int N = sc.nextInt();
^
Main.java:7: error: not a statement
8. int i;
^
Main.java:7: error: ';' expected
8. int i;
^
Main.java:8: error: not a statement
9. double pow=1;
^
Main.java:8: error: ';' expected
9. double pow=1;
^
Main.java:9: error: not a statement
10. double ans = 1;
^
Main.java:9: error: ';' expected
10. double ans = 1;
^
Main.java:10: error: not a statement
11. for(i = 1; i < N; i++){
^
Main.java:10: error: ';' expected
11. for(i = 1; i < N; i++){
^
Main.java:11: error: not a statement
12. pow = pow * i;
^
Main.java:11: error: ';' expected
12. pow = pow * i;
^
Main.java:12: error: not a statement
13. double ans = (double)pow % (Math.pow(10.0,9.0)+7.0);
^
Main.java:12: error: ';' expected
13. double ans = (double)pow % (Math.pow(10.0,9.0)+7.0);
^
Main.java:13: error: not a statement
14. }
^
Main.java:13: error: ';' expected
14. }
^
Main.java:14: error: not a statement
15. System.out.println((int)ans);
^
Main.java:14: error: ';' expected
15. System.out.println((int)ans);
^
Main.java:15: error: illegal character: '\u00a0'
16. ?
^
Main.java:15: error: not a statement
16. ?
^
Main.java:17: error: illegal start of type
18. }
^
27 errors
|
s686155093 | p03796 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int i;
int pow=1;
double ans=1;
for(i = 1; i <= N; i++){
pow = pow * i;
ans = pow % (Math.pow(10.0,9.0)+7.0);
pow=ans;
}
System.out.println((int)ans);
}
} | Main.java:12: error: incompatible types: possible lossy conversion from double to int
pow=ans;
^
1 error
|
s712237426 | p03796 | Java | import java.util.*;
public class Aaa{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int i;
int pow=1;
double ans=0;
for(i = 1; i <= N; i++){
pow = pow * i;
ans = pow % (Math.pow(10.0,9.0)+7.0);
}
System.out.println((int)ans);
}
}
| Main.java:2: error: class Aaa is public, should be declared in a file named Aaa.java
public class Aaa{
^
1 error
|
s661623579 | p03796 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int i;
int pow=1;
for(i = 1; i < N; i++){
pow = pow * i;
double ans = (double)pow % (Math.pow(10.0,9.0)+7.0);
}
System.out.println((int)ans);
}
}
| Main.java:1: error: illegal character: '\u00a0'
import java.util.*; ?
^
1 error
|
s864516125 | p03796 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int i;
int pow=1;
for(i = 1; i < N; i++){
pow = pow * i;
double ans = (double)pow % (Math.pow(10.0,9.0)+7.0);
}
System.out.println((int)ans);
}
}
| Main.java:1: error: illegal character: '\u00a0'
import java.util.*; ?
^
1 error
|
s518312275 | p03796 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int i;
int pow=1;
for(i = 1; i < N; i++){
pow = pow * i;
double ans = (double)pow % (Math.pow(10.0,9.0)+7.0);
}
System.out.println((int)ans);
}
}
| Main.java:1: error: illegal character: '\u00a0'
import java.util.*; ?
^
1 error
|
s784577823 | p03796 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int i;
for(i = 1; i < N; i++){
int pow = pow * i;
double ans = (double)pow % (Math.pow(10.0,9.0)+7.0);
}
System.out.println((int)ans);
}
}
| Main.java:12: error: cannot find symbol
System.out.println((int)ans);
^
symbol: variable ans
location: class Main
1 error
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.