submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s676527202 | p03796 | C++ | #include<bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define ll long long
#define vi vector<ll>
#define vvi vector<vi>
#define BITLE(n) (1LL<<((ll)n))
#define SHIFT_LEFT(n) (1LL<<((ll)n))
#define SUBS(s,f,t) ((s).su... | a.cc: In function 'int main()':
a.cc:24:17: error: 'n' was not declared in this scope
24 | for(ll i=1;i<=n;i++){
| ^
|
s778984190 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N; cin>>N;
int j=1;
for(int i=0; i<N; i++){
j*=(i+1);
j%=1000000007
}
cout<<j<<endl;
}
| a.cc: In function 'int main()':
a.cc:9:18: error: expected ';' before '}' token
9 | j%=1000000007
| ^
| ;
10 | }
| ~
|
s872875083 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N; cin>>N;
int j=1;
for(int i=0; i<N; i++){
j*=(i+1);
j=j%1000000007
}
cout<<j<<endl;
}
| a.cc: In function 'int main()':
a.cc:9:19: error: expected ';' before '}' token
9 | j=j%1000000007
| ^
| ;
10 | }
| ~
|
s366387730 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N; cin>>N;
int j=1;
for(int i=0; i<N; i++){
j*=(i+1);
j=j%10**9+7
}
cout<<j<<endl;
}
| a.cc: In function 'int main()':
a.cc:9:12: error: invalid type argument of unary '*' (have 'int')
9 | j=j%10**9+7
| ^~
|
s043351061 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vl;
typedef vector<string> vs;
typedef vector<char> vc;
typedef queue<ll> ql;
typedef deque<ll> dql;
typedef priority_queue<ll, vl/*, greater<ll>*/> pql; //降順(/*昇順*/)
typedef set<ll> sl;
typedef pair<ll, l... | a.cc: In function 'int main()':
a.cc:32:8: error: expected initializer before 'ans'
32 | ll n ans=1;
| ^~~
a.cc:33:10: error: 'n' was not declared in this scope; did you mean 'yn'?
33 | cin >> n;
| ^
| yn
a.cc:34:15: error: 'ans' was not declared in this scope; did y... |
s249329534 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
ll n;
cin >> n;
ll power = 1;
for (int i = 0; i < n; i++) {
power *= i + 1;
power %= 1e9+7;
}
cout << power << endl;
}
| a.cc: In function 'int main()':
a.cc:15:11: error: invalid operands of types 'll' {aka 'long long int'} and 'double' to binary 'operator%'
15 | power %= 1e9+7;
| ~~~~~~^~~~~~~~
a.cc:15:11: note: in evaluation of 'operator%=(ll {aka long long int}, double)'
|
s986202966 | p03796 | C++ | #include <iostream>
using namespace std;
int main(){
long long int a,b;
b=1;
cin>>a;
for(int i=0;i<a;i++){
b*=i;
}
cout<<(b%(1000000000+7))
} | a.cc: In function 'int main()':
a.cc:11:27: error: expected ';' before '}' token
11 | cout<<(b%(1000000000+7))
| ^
| ;
12 | }
| ~
|
s005231217 | p03796 | C++ | #include<cstdio>
long long s=1,n,t=1;
int main()
{
scanf("%lld",&n);
for(;t<n;t++)
{
s*=t,s%=1ll*(1e9+7);
}
printf("%lld",s);
return 0;
} | a.cc: In function 'int main()':
a.cc:8:23: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
8 | s*=t,s%=1ll*(1e9+7);
| ~^~~~~~~~~~~~~
a.cc:8:23: note: in evaluation of 'operator%=(long long int, double)'
|
s593181678 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
ll n;
cin>>n;
ll ans=1;
for(int i=1;i<=n;i++)ans=(ans*i)%1000000007;
cout<<ans<<endl;
}
| a.cc: In function 'int main()':
a.cc:5:3: error: 'll' was not declared in this scope
5 | ll n;
| ^~
a.cc:6:8: error: 'n' was not declared in this scope; did you mean 'yn'?
6 | cin>>n;
| ^
| yn
a.cc:7:5: error: expected ';' before 'ans'
7 | ll ans=1;
| ^~~~
... |
s155769574 | p03796 | 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=(ans*i)%1000000007;
cour<<ans<<endl;
}
| a.cc: In function 'int main()':
a.cc:9:3: error: 'cour' was not declared in this scope
9 | cour<<ans<<endl;
| ^~~~
|
s070759269 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
ll n;
cin>>n;
ll ans=1;
for(int i=1;i<=n;i++)ans=(ans*i)%1000000007;
cour<<ans<<endl;
} | a.cc: In function 'int main()':
a.cc:5:3: error: 'll' was not declared in this scope
5 | ll n;
| ^~
a.cc:6:8: error: 'n' was not declared in this scope; did you mean 'yn'?
6 | cin>>n;
| ^
| yn
a.cc:7:5: error: expected ';' before 'ans'
7 | ll ans=1;
| ^~~~
... |
s093622445 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N;
cin >> N;
int power = 1;
for(int i = 0; i < N; i++){
power *= i
}
int ans;
ans = power % 1000000007;
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:10:15: error: expected ';' before '}' token
10 | power *= i
| ^
| ;
11 | }
| ~
|
s347852326 | p03796 | C | #include<stdio.h>
int main(void)
{
double N,i,p;
p=1;
scanf("%lf",&N);
for(i=1;i<=N;i++)
p=p*i;
printf("%lf\n",p%1000000007);
return 0;
}
| main.c: In function 'main':
main.c:12:25: error: invalid operands to binary % (have 'double' and 'int')
12 | printf("%lf\n",p%1000000007);
| ^
|
s245547960 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
int cal(int N, int X){
if(N <= 0) return 1;
return N % X * cal(N - 1);
}
int main(){
int N;
cin >> N;
cout << cal(N, 1000000007) << endl;
}
| a.cc: In function 'int cal(int, int)':
a.cc:6:21: error: too few arguments to function 'int cal(int, int)'
6 | return N % X * cal(N - 1);
| ~~~^~~~~~~
a.cc:4:5: note: declared here
4 | int cal(int N, int X){
| ^~~
|
s555663056 | p03796 | C++ | #include<bits\stdc++.h>
using namespace std;
int cal(int N, int X){
if(N <= 0) return 1;
return N % X * cal(N - 1);
}
int main(){
int N;
cin >> N;
cout << cal(N, 1000000007) << endl;
} | a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s689129610 | p03796 | C++ | #include <iostream>
#include <math.h>
using namespace std;
int main() {
int ans=1;
int n;
cin >> n;
int div = pow(10,9) + 9;
for(int 1 = n;i == n+1;i++){
ans = ((ans) * i % div) % div;
}
std::cout << ans;
} | a.cc: In function 'int main()':
a.cc:9:11: error: expected unqualified-id before numeric constant
9 | for(int 1 = n;i == n+1;i++){
| ^
a.cc:9:10: error: expected ';' before numeric constant
9 | for(int 1 = n;i == n+1;i++){
| ^~
| ;
a.cc:9:11: error: lvalue requi... |
s174890546 | p03796 | C++ | #include<iostream>
#include<stdio.h>
#include<vector>
#include<algorithm>
#include<set>
#include<string>
#include<map>
#include<string.h>
#include<complex>
#include<math.h>
#include<queue>
#include <functional>
#include<time.h>
#include <stack>
#include<iomanip>
using namespace std;
#define rep(i,a,n) for(int i=(a);i<(... | a.cc: In function 'int main()':
a.cc:187:27: error: expected ';' before '}' token
187 | ans %= mod
| ^
| ;
188 | }
| ~
|
s238346193 | p03796 | C++ | using System;
using System.Collections.Generic;
using System.Linq;
using static System.Math;
using static _20200413.abc055_b.Cin;
using static _20200413.abc055_b.Util;
using Pair = _20200413.abc055_b.VTuple<long, long>;
/// <summary>
/// abc055
/// B - Training Camp
/// https://atcoder.jp/contests/abc055/tasks/abc055_... | 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... |
s045827187 | p03796 | C++ | using System;
using System.Collections.Generic;
using System.Linq;
using static System.Math;
using static _20200413.abc055_b.Cin;
using static _20200413.abc055_b.Util;
using Pair = _20200413.abc055_b.VTuple<long, long>;
/// <summary>
/// abc055
/// B - Training Camp
/// https://atcoder.jp/contests/abc055/tasks/abc055_... | 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... |
s505408166 | p03796 | C++ | import math
N = int(input())
print(math.factorial(N) % (10**9+7)) | a.cc:1:1: error: 'import' does not name a type
1 | import math
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s773164391 | p03796 | C++ | # frozen_string_literal: true
n = gets.to_i
tmp = 1
1.upto(n) do |i|
tmp *= i
tmp %= (10**9 + 7)
end
puts tmp | a.cc:1:3: error: invalid preprocessing directive #frozen_string_literal
1 | # frozen_string_literal: true
| ^~~~~~~~~~~~~~~~~~~~~
a.cc:3:1: error: 'n' does not name a type
3 | n = gets.to_i
| ^
|
s082265670 | p03796 | C++ | import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
from decimal import *
def lcm(x, y):
return (x * y) // math.gcd(x, y)
if __name__ == '__main__':
n =int(input())
ans =1
for i in range(1,n... | a.cc:17:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
17 | if __name__ == '__main__':
| ^~~~~~~~~~
a.cc:1:1: error: 'import' does not name a type
1 | import sys
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s255091381 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> p_ll;
typedef vector<pair<ll, ll>> vec_p; //vector<pair<ll, ll>> pairs(n) ,pairs.at(i) = make_pair(i*i, i)
const ll MOD = pow(10, 9) + 7;
const ll LLINF = pow(2, 61) - 1;
const int INF = pow(2, 30) - 1;
int main()
{
ios::s... | a.cc: In function 'int main()':
a.cc:22:16: error: expected ';' before '}' token
22 | ans=ans%MOD
| ^
| ;
23 | }
| ~
|
s782303551 | p03796 | C++ | #include <iostream>
#include <sstream>
#include <iterator>
#include <string>
#include <vector>
#include <algorithm>
#include <list>
#define YESNO(x) x ? printf("YES") : printf("NO")
#define YesNo(x) x ? printf("Yes") : printf("No")
using namespace std;
//ABC055B - Training Camp
//give up
int Main() {
static const c... | a.cc: In function 'int Main()':
a.cc:21:25: error: 'pow' was not declared in this scope
21 | long div = (int)pow(10, 9) + 7;
| ^~~
|
s351258802 | p03796 | C++ | #include <iostream>
#include <sstream>
#include <iterator>
#include <string>
#include <vector>
#include <algorithm>
#include <list>
#define YESNO(x) x ? printf("YES") : printf("NO")
#define YesNo(x) x ? printf("Yes") : printf("No")
using namespace std;
//ABC055B - Training Camp
int Main() {
static const char EMPTY ... | a.cc: In function 'int Main()':
a.cc:20:30: error: 'pow' was not declared in this scope
20 | long long div = (int)pow(10, 9) + 7;
| ^~~
|
s694460422 | p03796 | C++ | #include<bits/stdc++.h>
const int MOD=1e9+7;
using namespace std;
int main(){
int n;
cin >> n;
ll ans=1;
for(int i=1;i<=n;i++){
ans*=i;
ans%=MOD;
}
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:7:3: error: 'll' was not declared in this scope
7 | ll ans=1;
| ^~
a.cc:9:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
9 | ans*=i;
| ^~~
| abs
a.cc:12:11: error: 'ans' was not declared in this scope; did you mean 'abs'... |
s815553084 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define INF 1e9
#define PI 3.14159265359
#define MOD 1000000007
#define ALL(v) v.begin(),v.end()
typedef long long ll;
//isPrime
//modpow modinv
long long modpow(long long a, long long n, long long mod) {
long long res ... | a.cc: In function 'int main()':
a.cc:36:21: error: 'mod' was not declared in this scope; did you mean 'modf'?
36 | cout << modfact(n,mod) << endl;
| ^~~
| modf
|
s033351697 | p03796 | C | #include <stdio.h>
int main(){
int x,ans=0;
scanf("%d",&x);
for(int i=1;i<=x;i++){
ans=(ans * i)%(1000000000+7)
}
printf("%d",ans);
} | main.c: In function 'main':
main.c:6:33: error: expected ';' before '}' token
6 | ans=(ans * i)%(1000000000+7)
| ^
| ;
7 | }
| ~
|
s666699586 | p03796 | C++ | #include <iostream>
const int M = 1e9 + 7;
int solve(int N) {
long long ans = 1;
for (int i = 1; i <= N; ++i) {
ans = ans * i;
if (ans % M)
ans = ans % M;
assert(ans != 0);
}
ans = ans % M;
return ans;
}
void test() {
assert(solve(3) == 6);
assert(solve(10) == 3628800);
assert(solve... | a.cc: In function 'int solve(int)':
a.cc:11:5: error: 'assert' was not declared in this scope
11 | assert(ans != 0);
| ^~~~~~
a.cc:2:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
1 | #include <iostream>
+++ |+#include <cassert>
2 |... |
s729302890 | p03796 | C++ | import math
n = int(input())
print(math.factorial(n) % (10**9 + 7))
| a.cc:1:1: error: 'import' does not name a type
1 | import math
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s806148084 | p03796 | C++ |
#include <bits/stdc++.h>
using namespace std;
int main(){
int64_t n;
cin>>n;
int64_t p= 1;
for (int i = 1; i <= n; i++){
p=p*i%(10000000007);
cout<<p<<endl;
} | a.cc: In function 'int main()':
a.cc:11:2: error: expected '}' at end of input
11 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s540227658 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
long long int pow=1;
for(i=1;i<=n;i++)
{
pow*=i;
}
cout<<pow;
} | a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
8 | for(i=1;i<=n;i++)
| ^
|
s208295996 | p03796 | C++ | #include <iostream>
#include <cstdint>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
int main() {
int N;
cin >> N;
int mod = 10e9 + 7;
int64_t p = 1;
for (i = 1; i <= N; ++i) p = p * i % mod;
cout << p << endl;
}
| a.cc: In function 'int main()':
a.cc:10:18: warning: overflow in conversion from 'double' to 'int' changes value from '1.0000000007e+10' to '2147483647' [-Woverflow]
10 | int mod = 10e9 + 7;
| ~~~~~^~~
a.cc:12:8: error: 'i' was not declared in this scope
12 | for (i = 1; i <= N; ++i) p = p *... |
s002729101 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N;
cin >> N;
int64_t power = 1;
for(int i = 1; i <= N; i++){
power *= i;
power = power%1000000007
}
cout << power << endl;
}
| a.cc: In function 'int main()':
a.cc:10:29: error: expected ';' before '}' token
10 | power = power%1000000007
| ^
| ;
11 | }
| ~
|
s165888858 | p03796 | C++ | #include <bits.stdc++.h>
using namespace std;
int main(){
int N;
cin >> N;
int64_t power;
for(int i = 1; i <= N; i++){
power *= i;
}
cout << power%1000000007 << endl;
} | a.cc:1:10: fatal error: bits.stdc++.h: No such file or directory
1 | #include <bits.stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s671692552 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
unsigned GetDigit(int num){
int digit=0;
while(num!=0){
num /= 10;
digit++;
}
return digit;
}
int main() {
int N;
int ans = 1;
cin >> N;
for(int i=1;i<=N;i++)
ans = ans*i;
cout << ans << endl;
if(GetDi... | a.cc:32:10: error: redefinition of 'unsigned int GetDigit(int)'
32 | unsigned GetDigit(int num){
| ^~~~~~~~
a.cc:4:10: note: 'unsigned int GetDigit(int)' previously defined here
4 | unsigned GetDigit(int num){
| ^~~~~~~~
a.cc:41:5: error: redefinition of 'int main()'
41 | int mai... |
s984303867 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long int N,ans;
ans = 1;
for(long long int i = 1; i < N+1; i++){
ans *= i;
}
cout << ans % (pow(10,9) + 7);
return 0;
}
| a.cc: In function 'int main()':
a.cc:13:17: error: invalid operands of types 'long long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
13 | cout << ans % (pow(10,9) + 7);
| ~~~ ^ ~~~~~~~~~~~~~~~
| | |
| lon... |
s937405244 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
//入力
int N;
cin >> N;
//計算
int64_t ans=1;
for(int i=0;i<N;i++){
ans*=(i+1);
ans%=(pow(10,9)+7);
}
//出力
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:14:12: error: invalid operands of types 'int64_t' {aka 'long int'} and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
14 | ans%=(pow(10,9)+7);
| ~~~^~~~~~~~~~~~~~~
a.cc:14:12: note: in evaluation of 'operator%=(int64_t {aka lon... |
s401864701 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
int kaijou(int n){
if(n==1)return 1;
return n*kaijou(n-1);
}
int main(){
long long power = 1,x;
int n;
cin >> n;
x = powl(10,9)+7;
long long a = kaijou(n);
cout << a(int) % x(int) << endl;
}
| a.cc: In function 'int main()':
a.cc:16:13: error: expected primary-expression before 'int'
16 | cout << a(int) % x(int) << endl;
| ^~~
a.cc:16:16: error: 'a' cannot be used as a function
16 | cout << a(int) % x(int) << endl;
| ^
a.cc:16:22: error: expected primary-exp... |
s131152191 | p03796 | C++ | #include <iostream>
using namespace std;
int main(void) {
int i;
cin >> i;
double power = 1;
for (int a=1; a<=i; i++) {
power = i * power % 1000000007;
}
cout << power << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:23: error: invalid operands of types 'double' and 'int' to binary 'operator%'
10 | power = i * power % 1000000007;
| ~~~~~~~~~ ^ ~~~~~~~~~~
| | |
| double int
|
s855874406 | p03796 | C++ | #include <iostream>
using namespace std;
int main(){
int N;
int power = 1;
for (i=1;i<=N;++i){
power = (power*i) % (10^9 + 7);
}
cout << power;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:8: error: 'i' was not declared in this scope
6 | for (i=1;i<=N;++i){
| ^
|
s869285760 | p03796 | C | #include <iostream>
using namespace std;
int main() {
long long int n, i, p = 1, M = 1000000007;
cin>>n;
for (i = 1; i <= n; i++)
p = (p * i) % M;
cout<<p;
return 0;
} | main.c:1:14: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s792207975 | p03796 | C | #include<iostream>
#include<cmath>
using namespace std;
int main()
{
const unsigned int M=1000000007;
unsigned long long r=1;
int n;
cin>>n;
for( int i=1;i<=n;i++){
r=(r*i)%M;
}
cout<<r<<endl;
return 0;
} | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s303441851 | p03796 | C | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
long long int fact(long long int x);
int main()
{ long long int k,s;
long long int n;
scanf("%lld",&n);
k=fact(n);
s=s%(pow(10,9)+7);
printf("%lld",s);
return 0;
}
long long int fact(long long int x)
{ if(x==0 || x==1)
return 1;
else
return x*fact(x-1... | main.c: In function 'main':
main.c:10:4: error: invalid operands to binary % (have 'long long int' and 'double')
10 | s=s%(pow(10,9)+7);
| ^~~~~~~~~~~~~~
| |
| double
|
s639562580 | p03796 | C | #include<stdi.h>
int main()
{
int i;
long n;
scanf("%lld",&n);
i=0;
while(i>=n)
{
ans*=i;
}
printf("%ld",ans%(1000000000+7));
} | main.c:1:9: fatal error: stdi.h: No such file or directory
1 | #include<stdi.h>
| ^~~~~~~~
compilation terminated.
|
s429136677 | p03796 | C | #include <stdio.h>
#include <stdlib.h>
long long int(long long int x);
int main()
{ long long int k,s;
long long int n;
scanf("%lld",&n);
k=fact(n);
s=s%(pow(10,9)+7);
printf("%lld",s);
return 0;
}
long long int(long long int x)
{ if(x==0 || x==1)
return 1;
else
return x*fact(x-1);
} | main.c:3:15: error: expected identifier or '(' before 'long'
3 | long long int(long long int x);
| ^~~~
main.c: In function 'main':
main.c:8:3: error: implicit declaration of function 'fact' [-Wimplicit-function-declaration]
8 | k=fact(n);
| ^~~~
main.c:9:6: error: implicit declarati... |
s250200654 | p03796 | C | #include<stdio.h>
int main()
{
int i;
long long n;
scanf("%d",&n);
i=0;
while(i>=n)
{
ans*=i;
}
printf("%d",ans%1000000000+7);
} | main.c: In function 'main':
main.c:10:1: error: 'ans' undeclared (first use in this function)
10 | ans*=i;
| ^~~
main.c:10:1: note: each undeclared identifier is reported only once for each function it appears in
|
s773409047 | p03796 | C | #include<stdi.h>
int main()
{
int i;
long long n;
scanf("%d",&n);
i=0;
while(i>=n)
{
ans*=i;
}
printf("%d",ans%(1000000000+7));
} | main.c:1:9: fatal error: stdi.h: No such file or directory
1 | #include<stdi.h>
| ^~~~~~~~
compilation terminated.
|
s979565617 | p03796 | C | #include <stdio.h>
#include <stdlib.h>
long long int(long long int x);
int main()
{
long long int n;
scanf("%lld",&n);
printf("%lld",fact(n));
return 0;
}
long long int(long long int x)
{ if(x==0 || x==1)
return 1;
else
return n*fact(n-1);
} | main.c:3:15: error: expected identifier or '(' before 'long'
3 | long long int(long long int x);
| ^~~~
main.c: In function 'main':
main.c:9:15: error: implicit declaration of function 'fact' [-Wimplicit-function-declaration]
9 | printf("%lld",fact(n));
| ^~~~
main.c: At ... |
s585467092 | p03796 | C++ | #include<iostream>
using namespace std;
#forでも階乗かける
long fact(int n)
{
if(n==1) return 1;
return (n * fact(n-1)) % (1000000007);
}
int main()
{
int n;
cin >> n;
long ans;
ans = fact(n);
cout << ans << endl;
} | a.cc:4:2: error: invalid preprocessing directive #for\U00003067\U00003082\U0000968e\U00004e57\U0000304b\U00003051\U0000308b
4 | #forでも階乗かける
| ^~~~~~~~~~~~~~~~~
|
s188689275 | p03796 | C++ | #include<bits/stdc++.h>
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define reps(i,l,n) for(int i=(l);i<(n);i++)
int mod=1000000007;
int main(){
ll power=1;
int N;
cin >> N;
rep(i,N){
power*=i+1;
... | a.cc:3:9: error: 'vector' does not name a type
3 | typedef vector<int> vi;
| ^~~~~~
a.cc:4:9: error: 'vector' does not name a type
4 | typedef vector<vector<int>> vvi;
| ^~~~~~
|
s539566139 | p03796 | Java | import java.util.*;
class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int ans = 1;
for(int i = 1;i <= n;i++){
ans *= i;
}
ans = ans % (1000000000 + 7);
System.out.println(ans);
}
| Main.java:15: error: reached end of file while parsing
}
^
1 error
|
s056079583 | p03796 | Java | import java.util.*;
import java.lang.Math;
class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
long ans = 1;
for(int i = 1;i <= n;i++){
ans *= i;
}
ans = ans % (Math.pow(10,9) + 7);
System.out.println(ans);
}
} | Main.java:13: error: incompatible types: possible lossy conversion from double to long
ans = ans % (Math.pow(10,9) + 7);
^
1 error
|
s428933317 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
int n;cin >> n;
mod=1000000007;
long long ans=1;
for (int i=1;i<n+1;i++) {
ans *= i;
ans %= mod;
}
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:6:3: error: 'mod' was not declared in this scope; did you mean 'modf'?
6 | mod=1000000007;
| ^~~
| modf
|
s104985175 | p03796 | C++ | #include <bits/stdc++.h>
#include <algorithm>
#include <string>
#include <vector>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
long long N, answer = 1;
cin >> N;
for (long long i = 1; i <= N; ++i) {
answer = (answer * i) % mod;
}
cout << answer << en... | a.cc: In function 'int main()':
a.cc:13:33: error: 'mod' was not declared in this scope; did you mean 'modf'?
13 | answer = (answer * i) % mod;
| ^~~
| modf
|
s311126085 | p03796 | C++ | #include<iostream>
#include<cmath>
using namespace std;
int main(){
int n;
cin>>n;
int res=1;
for(int i=1;i<=n;i++){
res*=i;
res%=(pow(10,9)+7);
}
cout<<res<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:12: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
10 | res%=(pow(10,9)+7);
| ~~~^~~~~~~~~~~~~~~
a.cc:10:12: note: in evaluation of 'operator%=(int, __gnu_cxx::__promote<double>::__... |
s396870382 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i=0; i<(int)(n); i++)
int main(){
long long int n,ans;
cin >> n;
ans = 0;
rep(i,n){ans = ans*n;}
cout << ans%(pow(10,9)+7) << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:14: error: invalid operands of types 'long long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
10 | cout << ans%(pow(10,9)+7) << endl;
| ~~~^~~~~~~~~~~~~~
| | |
| long long int ... |
s521955767 | p03796 | C | #include<stdio.h>
int main(){
int n,i,
long ans=0;
scanf("%d",&n);
for(i=1;i<=n;i++){
ans=ans*i%1000000007;
}
printf("%ld",ans);
return 0;
} | main.c: In function 'main':
main.c:4:5: error: expected identifier or '(' before 'long'
4 | long ans=0;
| ^~~~
main.c:7:9: error: 'ans' undeclared (first use in this function)
7 | ans=ans*i%1000000007;
| ^~~
main.c:7:9: note: each undeclared identifier is reported only once f... |
s241245191 | p03796 | C | #include<stdio.h>
int main(){
int n,i,
long ans=0;
scanf("%d",&n);
for(i=1;i<=n;i++){
ans=ans*i%1000000007;
}
printf("%d",ans);
return 0;
} | main.c: In function 'main':
main.c:4:5: error: expected identifier or '(' before 'long'
4 | long ans=0;
| ^~~~
main.c:7:9: error: 'ans' undeclared (first use in this function)
7 | ans=ans*i%1000000007;
| ^~~
main.c:7:9: note: each undeclared identifier is reported only once f... |
s345798767 | p03796 | C++ | #include<iostream>
int main(){
int t,ans=1;std::cin>>t;for(int i=0;i<t;i++) ans=ans*t%(1e9+7);std::cout<<ans<<endl;
} | a.cc: In function 'int main()':
a.cc:3:55: error: invalid operands of types 'int' and 'double' to binary 'operator%'
3 | int t,ans=1;std::cin>>t;for(int i=0;i<t;i++) ans=ans*t%(1e9+7);std::cout<<ans<<endl;
| ~~~~~^~~~~~~~
| ... |
s218310232 | p03796 | C++ | #include <iostream>
using namespace std;
int main() {
long long a,x=1;
cin>>a;
for(int i=0;i<a;i++)
x*=i;
x%=1e9+7;
}
cout<<x%1e9+7<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:10: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
10 | x%=1e9+7;
| ~^~~~~~~
a.cc:10:10: note: in evaluation of 'operator%=(long long int, double)'
a.cc: At global scope:
a.cc:12:17: error: 'cout' does not name a typ... |
s855309498 | p03796 | C++ | #include<cstdio>
#include<iostream>
#include<algorithm>
#include<cmath>//常用文件头,不知道的可以记一下
using namespace std;
long long n,m=1,k;//设a初始值为1,不然在之后的阶乘中0乘什么数都等于0
int main()
{
cin>>n
for (long long i=1;i<=n;i++)//这里定义i要用long long,不然用int的话就会......
{
k=i%1000000007;//计算出现在阶乘到多少了
m*=k;//阶乘
}
cou... | a.cc: In function 'int main()':
a.cc:9:11: error: expected ';' before 'for'
9 | cin>>n
| ^
| ;
10 | for (long long i=1;i<=n;i++)//这里定义i要用long long,不然用int的话就会......
| ~~~
a.cc:10:24: error: 'i' was not declared in this scope
10 | for (long long i=1;i<=n... |
s316397467 | p03796 | C++ | #include<cstdio>
#include<iostream>
#include<algorithm>
#include<cmath>//常用文件头,不知道的可以记一下
using namespace std;
long long n,m=1,k;//设a初始值为1,不然在之后的阶乘中0乘什么数都等于0
int main()
{
cin>>n
for(long long i=1;i<=n;i++)//这里定义i要用long long,不然用int的话就会......
{
k=i%1000000007;//计算出现在阶乘到多少了
m*=k;//阶乘
}
cout... | a.cc: In function 'int main()':
a.cc:9:11: error: expected ';' before 'for'
9 | cin>>n
| ^
| ;
10 | for(long long i=1;i<=n;i++)//这里定义i要用long long,不然用int的话就会......
| ~~~
a.cc:10:23: error: 'i' was not declared in this scope
10 | for(long long i=1;i<=n;i... |
s934633177 | p03796 | C++ | ```cpp
#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cmath>//常用文件头,不知道的可以记一下
using namespace std;
long long n,m=1,k;//设a初始值为1,不然在之后的阶乘中0乘什么数都等于0
int main()
{
cin>>n
for(long long i=1;i<=n;i++)//这里定义i要用long long,不然用int的话就会......
{
k=i%1000000007;//计算出现在阶乘到多少了
m*=k;//阶乘
}
... | a.cc:1:1: error: stray '`' in program
1 | ```cpp
| ^
a.cc:1:2: error: stray '`' in program
1 | ```cpp
| ^
a.cc:1:3: error: stray '`' in program
1 | ```cpp
| ^
a.cc:19:1: error: stray '`' in program
19 | ```
| ^
a.cc:19:2: error: stray '`' in program
19 | ```
| ^
a.cc:... |
s910990262 | p03796 | C++ | #include <iostream>
using namespace std;
int main(){
int a;
cin >> a;
int b =1;
for (int i =1 ;i<=a; i++){
b *= i;
}
cout << b%1000000007 << endl;
| a.cc: In function 'int main()':
a.cc:13:32: error: expected '}' at end of input
13 | cout << b%1000000007 << endl;
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s399714352 | p03796 | C++ | #include <iostream>
using namespace std;
int main(){
int a;
cin a;
int b =1;
for (int i =1 ;i<=a; i++){
b *= i;
}
cout << b%1000000007 << endl;
| a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'a'
6 | cin a;
| ^~
| ;
a.cc:13:32: error: expected '}' at end of input
13 | cout << b%1000000007 << endl;
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ... |
s490906120 | p03796 | C++ | #include <iostream>
using namespace std;
int main(){
int a;
cin a;
int b =1;
for (int i =1 i<=a i++){
b *= i;
}
cout << b%1000000007 << endl;
| a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'a'
6 | cin a;
| ^~
| ;
a.cc:10:16: error: expected ';' before 'i'
10 | for (int i =1 i<=a i++){
| ^~
| ;
a.cc:10:21: error: expected ';' before 'i'
10 | for (int i =1 i<=... |
s166041972 | p03796 | C | #include<stdio.h>
int main(void){
int a,b,n;
int c=1;
scanf("%d",&n);
for(a=1;a<=n;a++){
c*=a;
b=c;
println("%d\n",b%(10**9+7));
}
return 0;
} | main.c: In function 'main':
main.c:9:3: error: implicit declaration of function 'println'; did you mean 'printf'? [-Wimplicit-function-declaration]
9 | println("%d\n",b%(10**9+7));
| ^~~~~~~
| printf
main.c:9:24: error: invalid type argument of unary '*' (have 'int')
9 | println("%d\n",b%(10... |
s317841666 | p03796 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF (1ll << 60)
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
typedef pair<ll,... | a.cc: In function 'int main()':
a.cc:40:17: error: expected primary-expression before '=' token
40 | power % = MOD;
| ^
|
s348240857 | p03796 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF (1ll << 60)
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
typedef pair<ll,... | a.cc:12:26: warning: overflow in conversion from 'double' to 'int' changes value from '1.0000000007e+10' to '2147483647' [-Woverflow]
12 | constexpr int MOD = 10e9 + 7;
| ~~~~~^~~
a.cc:12:28: error: overflow in constant expression [-fpermissive]
12 | constexpr int MOD = 10e9 + 7;
|... |
s272442796 | p03796 | Java | import java.util.*;
import java.util.Arrays;
import java.lang.Math;
import java.math.BigInteger;
public class B055 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
BigInteger sum = BigInteger.ONE;
BigInteger kekka = BigInteger.ZE... | Main.java:6: error: class B055 is public, should be declared in a file named B055.java
public class B055 {
^
1 error
|
s648706666 | p03796 | C++ | #include<iostream>
using namespace std;
int main()
{
int a;
int result = 1;
int mod = 1000000007;
cin >> a;
for(int i=1; i <=a; a++;){
result *= a%mod;
}
cout << result << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:32: error: expected ')' before ';' token
9 | for(int i=1; i <=a; a++;){
| ~ ^
| )
a.cc:9:33: error: expected primary-expression before ')' token
9 | for(int i=1; i <=a; a++;){
| ... |
s767327676 | p03796 | C++ | #include<iostream>
using namespace std;
int main()
{
int a;
int result = 1;
int mod = 1000000007;
cin >> a;
for(int i=1; i <=a; a++;){
result *= a%mod;
}
cout << reuslt << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:32: error: expected ')' before ';' token
9 | for(int i=1; i <=a; a++;){
| ~ ^
| )
a.cc:9:33: error: expected primary-expression before ')' token
9 | for(int i=1; i <=a; a++;){
| ... |
s088604557 | p03796 | C++ | #include<iostream>
using namespace std;
int main()
{
int a;
int result = 1;
int mod = 1000000007;
cin >> a;
for(int i=1; i <=a a++;){
result *= a%mod;
}
cout << reuslt << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:27: error: expected ';' before 'a'
9 | for(int i=1; i <=a a++;){
| ^~
| ;
a.cc:9:31: error: expected ')' before ';' token
9 | for(int i=1; i <=a a++;){
| ~ ^
... |
s280922944 | p03796 | C++ | #include<iostream>
using namespace std;
int main()
{
int a;
int result = 1;
int mod = 1000000007;
cin >> a;
for(int i=1; i <=a a++){
result *= a%mod;
}
cout << reuslt << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:27: error: expected ';' before 'a'
9 | for(int i=1; i <=a a++){
| ^~
| ;
a.cc:12:17: error: 'reuslt' was not declared in this scope; did you mean 'result'?
12 | cout << reuslt << endl;
| ... |
s220831405 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;
const int big = 1000000007
int main() {
int N;
cin >> N;
int power = 1;
for (int i = 1; i <= N; i++){
power = (powe... | a.cc:8:1: error: expected ',' or ';' before 'int'
8 | int main() {
| ^~~
|
s166933913 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
long long p = 1;
for(int i=0; i<n; i++){
p = p * (i+1);
}
p = p % (pow(10, 9)+7);
cout << p << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:9: error: invalid operands of types 'long long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
12 | p = p % (pow(10, 9)+7);
| ~ ^ ~~~~~~~~~~~~~~
| | |
| long long int __gnu_cxx::__promote<... |
s717360266 | p03796 | C++ | #include <iostream>
using namespace std;
long long int D = 1000000007;
int main(){
long long int I;
cin >> I
long long int ans = 1LL;
for(int i = 1; i <= I; i++){
ans = (ans * i) % D;
}
cout << ans;
} | a.cc: In function 'int main()':
a.cc:9:11: error: expected ';' before 'long'
9 | cin >> I
| ^
| ;
10 | long long int ans = 1LL;
| ~~~~
a.cc:12:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
12 | ans = (ans * i) % D;
| ^~~
... |
s243416875 | p03796 | C++ | #include<iostream>
using namespace std;
int main(){
int n,ans=1;
cin >>n;
for(int i=1;i<=n;i++){
ans = ans%1e9+7;
ans *= i;
}
cout<<ans<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:16: error: invalid operands of types 'int' and 'double' to binary 'operator%'
7 | ans = ans%1e9+7;
| ~~~^~~~
| | |
| int double
|
s157378072 | p03796 | C++ | #include<iostream>
using namespace std;
int main(){
long long int n,ans=1;
cin >>n;
for(int i=1;i<=n;i++){
ans = ans%1e9+7;
ans *= i;
}
cout<<ans<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:16: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
7 | ans = ans%1e9+7;
| ~~~^~~~
| | |
| | double
| long long int
|
s107996081 | p03796 | C++ | #include<iostream>
using namespace std;
int main(){
long long int n,ans=1;
cin >>n;
for(int i=1;i<=n;i++){
ans %= 1e9+7;
ans *= i;
}
cout<<ans<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:11: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
7 | ans %= 1e9+7;
| ~~~~^~~~~~~~
a.cc:7:11: note: in evaluation of 'operator%=(long long int, double)'
|
s828574656 | p03796 | C | #include<stdio.h>
int main(void){
int n;
long int power = 1;
scanf("%d",&n);
for(int i = 1;i<=n;i++){
power *= i;
power %= 1000000007;
}
printf("%lld",power)
return 0;
}
| main.c: In function 'main':
main.c:10:23: error: expected ';' before 'return'
10 | printf("%lld",power)
| ^
| ;
11 | return 0;
| ~~~~~~
|
s777760100 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
long long n,cnt=1;
int main(){
scanf("%lld",&n);
for(int i=1;i<=n;i++){
cnt*=i;
cnt%=(1e9+7);
}
printf("%lld",cnt);
} | a.cc: In function 'int main()':
a.cc:8:20: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
8 | cnt%=(1e9+7);
| ~~~^~~~~~~~~
a.cc:8:20: note: in evaluation of 'operator%=(long long int, double)'
|
s797386125 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
int sum=1;
for(;0<n;n--){
sum *=n;
sum%=pow(10,9)+7;
}
cout<<sum<<endl;
} | a.cc: In function 'int main()':
a.cc:10:8: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
10 | sum%=pow(10,9)+7;
| ~~~^~~~~~~~~~~~~
a.cc:10:8: note: in evaluation of 'operator%=(int, __gnu_cxx::__promote<double>::__type {aka doub... |
s516735824 | p03796 | C++ | 100000 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 100000
| ^~~~~~
|
s368511078 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t S;
cin>>S;
int64_t G=1;
for(int i=0; i<S; i++){
G*=(i+1);
}
cout<<Gmod(1E9+711)<<endl;
}
| a.cc: In function 'int main()':
a.cc:11:7: error: 'Gmod' was not declared in this scope; did you mean 'fmod'?
11 | cout<<Gmod(1E9+711)<<endl;
| ^~~~
| fmod
|
s286444582 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t S;
cin>>S;
int64_t G=1;
for(int i=0; i<S; i++){
G*=(i+1);
}
cout<<G%(1E9+711)<<endl;
}
| a.cc: In function 'int main()':
a.cc:11:8: error: invalid operands of types 'int64_t' {aka 'long int'} and 'double' to binary 'operator%'
11 | cout<<G%(1E9+711)<<endl;
| ~^~~~~~~~~~
| | |
| | double
| int64_t {aka long int}
|
s921203141 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t S;
cin>>S;
int64_t G=1;
for(int i=0; i<S; i++){
G*=(i+1);
}
cout<<G%(1E9+7)<<endl;
}
| a.cc: In function 'int main()':
a.cc:11:8: error: invalid operands of types 'int64_t' {aka 'long int'} and 'double' to binary 'operator%'
11 | cout<<G%(1E9+7)<<endl;
| ~^~~~~~~~
| | |
| | double
| int64_t {aka long int}
|
s079463793 | p03796 | C++ | #include <iostream>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <string>
#include <cmath>
#include <new>
#include <map>
using namespace std;
int main() {
int n,power;
for(int i = 0; i < n;i++){
power = power * i;
}
cout << power % (pow(10,9) + 7) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:18:23: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
18 | cout << power % (pow(10,9) + 7) << endl;
| ~~~~~ ^ ~~~~~~~~~~~~~~~
| | |
|... |
s287385148 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int n,ans;
ans=1;
cin >> n;
for(int i=1;i<=n;i++){
ans*=i;
}
cout<<ans%pow(10,9)+7<<endl;
}
| a.cc: In function 'int main()':
a.cc:11:12: error: invalid operands of types 'long long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
11 | cout<<ans%pow(10,9)+7<<endl;
| ~~~^~~~~~~~~~
| | |
| | __gnu_cxx::__promote<double>::... |
s174512615 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int n,ans;
ans=1;
cin >> n;
for(int i=1;i<=n;i++){
ans*=i;
}
cout<<ans%(pow(10,9)+7)<<endl;
}
| a.cc: In function 'int main()':
a.cc:11:12: error: invalid operands of types 'long long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
11 | cout<<ans%(pow(10,9)+7)<<endl;
| ~~~^~~~~~~~~~~~~~
| | |
| long long int __gnu_cxx:... |
s196008588 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n,ans;
ans=1;
cin >> n;
for(int i=1;i<=n;i++){
ans*=i;
}
cout<<ans<<endl;
} | a.cc:8:3: error: extended character is not valid in an identifier
8 | for(int i=1;i<=n;i++){
| ^
a.cc: In function 'int main()':
a.cc:8:9: error: expected primary-expression before 'int'
8 | for(int i=1;i<=n;i++){
| ^~~
a.cc:8:17: error: 'i' was not declared in this scope
8 | ... |
s563650430 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int128_t S;
cin>>S;
int128_t G=1;
for(int i=0; i<S; i++){
G*=(i+1);
}
cout<<G%(10*10*10*10*10*10*10*10*10+7)<<endl;
} | a.cc: In function 'int main()':
a.cc:5:3: error: 'int128_t' was not declared in this scope; did you mean 'int8_t'?
5 | int128_t S;
| ^~~~~~~~
| int8_t
a.cc:6:8: error: 'S' was not declared in this scope
6 | cin>>S;
| ^
a.cc:7:11: error: expected ';' before 'G'
7 | int128_t... |
s835897746 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t S;
cin>>S;
int128_t G=1;
for(int i=0; i<S; i++){
G*=(i+1);
}
cout<<G%(10*10*10*10*10*10*10*10*10+7)<<endl;
} | a.cc: In function 'int main()':
a.cc:7:3: error: 'int128_t' was not declared in this scope; did you mean 'int8_t'?
7 | int128_t G=1;
| ^~~~~~~~
| int8_t
a.cc:9:5: error: 'G' was not declared in this scope
9 | G*=(i+1);
| ^
a.cc:11:7: error: 'G' was not declared in this scope
1... |
s836111184 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t S;
cin>>S;
int64_t G=1;
for(int i=0; i<S; i++)
G*=i;
}
cout<<G%(10*10*10*10*10*10*10*10*10+7)<<endl;
} | a.cc:11:1: error: 'cout' does not name a type
11 | cout<<G%(10*10*10*10*10*10*10*10*10+7)<<endl;
| ^~~~
a.cc:12:1: error: expected declaration before '}' token
12 | }
| ^
|
s006506431 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
#define MOD 10e9+7
int main(){
int N; cin >> N;
long long int power = 1;
for(int i=1;i<N+1;i++){
power = (power*i) % MOD;
}
cout << power;
} | a.cc: In function 'int main()':
a.cc:10:27: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
10 | power = (power*i) % MOD;
| ~~~~~~~~~ ^
| |
| long long int
|
s449414376 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
#define MOD 10e9+7
int main(){
int N; cin >> N;
long long int power = 1;
for(int i=1;i<N+1;i++){
power = (power*i) %
}
cout << power;
} | a.cc: In function 'int main()':
a.cc:11:5: error: expected primary-expression before '}' token
11 | }
| ^
|
s883490310 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
#define MOD 10e9+7
int main(){
int N; cin >> N;
power = 1;
for(int i=1;i<N+1;i++){
power = (power*i) %
}
cout << power;
} | a.cc: In function 'int main()':
a.cc:8:5: error: 'power' was not declared in this scope
8 | power = 1;
| ^~~~~
a.cc:11:5: error: expected primary-expression before '}' token
11 | }
| ^
|
s813184465 | 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 m = 1;
int k = (int)Math.pow(10,9)+7
for(int i = 1;i <= n;i++){
m = (m*i)%k;
}
System.out.println(m);
}
} | Main.java:7: error: ';' expected
int k = (int)Math.pow(10,9)+7
^
1 error
|
s895188215 | p03796 | Java | import java.io.InputStream;
import java.util.Scanner;
/**
* AtCoder Beginner Contest 055<br>
* B - Training Camp<br>
* <br>
* <a href="https://atcoder.jp/contests/abc055/tasks/abc055_b">AtCoderへのリンク</a><br>
*/
public class Main {
/**
* エントリポイント
*/
public static void main(String[] args) {
... | Main.java:19: error: incompatible types: possible lossy conversion from double to long
long power = proc(N);
^
1 error
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.