submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s429659988 | 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;
int ans = pow % (Math.pow(10.0,9.0)+7.0);
}
System.out.println(ans);
}
} | Main.java:5: error: illegal character: '\u2028'
?int n = sc.nextInt();
^
1 error
|
s182844483 | 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;
int ans = pow % (Math.pow(10.0,9.0)+7.0)
}
System.out.println(ans);
}
} | Main.java:5: error: illegal character: '\u2028'
?int n = sc.nextInt();
^
Main.java:9: error: ';' expected
int ans = pow % (Math.pow(10.0,9.0)+7.0)
^
2 errors
|
s737308312 | p03796 | Java | 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;
int ans = pow % (Math.pow(10.0,9.0)+7.0)
}
System.out.println(ans);
}
} | Main.java:4: error: illegal character: '\u2028'
?int n = sc.nextInt();
^
Main.java:8: error: ';' expected
int ans = pow % (Math.pow(10.0,9.0)+7.0)
^
2 errors
|
s113432481 | p03796 | Java | 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;
int ans = pow % (10^9+7);
}
System.out.println(ans);
}
} | Main.java:4: error: illegal character: '\u2028'
?int n = sc.nextInt();
^
1 error
|
s823858353 | p03796 | Java | 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;
int ans = pow % (10^9+7);
}
System.out.println(ans);
}
} | Main.java:4: error: illegal character: '\u2028'
?int n = sc.nextInt();int i;
^
1 error
|
s281696087 | p03796 | C++ | //簡易競プロテンプレ
#include<bits/stdc++.h>
using namespace std;
int main(void){
int n; cin >> n;
ll ans = 1;
for(int i=1;i<=n;i++) ans = ans * i % 1000000007;
cout << ans << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:2: error: 'll' was not declared in this scope
6 | ll ans = 1;
| ^~
a.cc:7:24: error: 'ans' was not declared in this scope; did you mean 'abs'?
7 | for(int i=1;i<=n;i++) ans = ans * i % 1000000007;
| ^~~
| a... |
s109662480 | p03796 | Java | import java.util.*;
public class ABC055_B {
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int N=sc.nextInt(),x=1;
for(int i=1;i<=N;i++){
x=x*i;
}
System.out.println((int)(x%(Math.pow(10,9)+7)));
}
} | Main.java:2: error: class ABC055_B is public, should be declared in a file named ABC055_B.java
public class ABC055_B {
^
1 error
|
s417887537 | p03796 | Java | package spring21;
public class ABC055_B {
public static void main(String[] args){
int N=10,x=1;
for(int i=1;i<=N;i++){
x=x*i;
}
System.out.println(x);
}
} | Main.java:3: error: class ABC055_B is public, should be declared in a file named ABC055_B.java
public class ABC055_B {
^
1 error
|
s109850868 | p03796 | C++ | mod=10**9+7
n=gets.to_i
puts (1..n).inject(1, :*)%mod | a.cc:4:7: error: too many decimal points in number
4 | puts (1..n).inject(1, :*)%mod
| ^~~~
a.cc:1:1: error: 'mod' does not name a type
1 | mod=10**9+7
| ^~~
|
s580040140 | p03796 | Java | import java.util.Scanner;
public class Main {
public static void main (String[] args) {
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();
int num = 1;
int power = 1;
for (int i = 1 ; i <= N ; i++){
num *= i;
}
power = num % (Math.pow(10,9) + 7);
System.out.println(power);
}... | Main.java:13: error: incompatible types: possible lossy conversion from double to int
power = num % (Math.pow(10,9) + 7);
^
1 error
|
s317967175 | p03796 | C++ | #include<iostream>
using namespace std;
int main(){
int N;
cin >> N;
long long ans = 1:
for(int i =1;j<=N;j++){
ans =ans*j%1000000007;
}
cout << ans << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:22: error: expected ',' or ';' before ':' token
7 | long long ans = 1:
| ^
a.cc:9:18: error: 'j' was not declared in this scope
9 | for(int i =1;j<=N;j++){
| ^
|
s602697288 | p03796 | Java | import java.util.*;
public class Playground2 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
long a = 1;
for (long i = 1; i <= n; i++) {
a = a * i % 1000000007;
}
System.out.println(a);
}
} | Main.java:3: error: class Playground2 is public, should be declared in a file named Playground2.java
public class Playground2 {
^
1 error
|
s078525918 | p03796 | C | #include <stdio.h>
int main()
{
double power=1;
double int,num;
scanf("%lf",&num);
for(i=1;i<=num;i++){
power=(power*i)%1000000007;
};
printf("%f",power);
return 0;
} | main.c: In function 'main':
main.c:5:16: error: two or more data types in declaration specifiers
5 | double int,num;
| ^~~
main.c:5:19: error: expected identifier or '(' before ',' token
5 | double int,num;
| ^
main.c:8:22: error: 'num' undeclared (fi... |
s796785804 | p03796 | C | #include <stdio.h>
int main()
{
double power=1;
int i,num;
scanf("%d",&num);
for(i=1;i<=num;i++){
power=(power*i)%1000000007;
};
printf("%f",power);
return 0;
} | main.c: In function 'main':
main.c:10:32: error: invalid operands to binary % (have 'double' and 'int')
10 | power=(power*i)%1000000007;
| ~~~~~~~~~^
| |
| double
|
s574234526 | p03796 | C | #include <stdio.h>
int main()
{
double num,i;
int power=1;
scanf("%lf",&num);
for(i=1;i<=num;i++){
power=(power*i)%1000000007;
};
printf("%f",power);
return 0;
} | main.c: In function 'main':
main.c:8:32: error: invalid operands to binary % (have 'double' and 'int')
8 | power=(power*i)%1000000007;
| ~~~~~~~~~^
| |
| double
|
s642878962 | p03796 | C | #include <stdio.h>
int main()
{
double num,i;
int power=1;
scanf("%lf",&num);
for(i=1;i<=num;i++){
power=(power*i)%1000000007;
};
printf("%d",power);
return 0;
} | main.c: In function 'main':
main.c:8:32: error: invalid operands to binary % (have 'double' and 'int')
8 | power=(power*i)%1000000007;
| ~~~~~~~~~^
| |
| double
|
s918705291 | p03796 | C | #include <stdio.h>
int main()
{
double num,i;
int power=1;
scanif("%f",&num);
for(i=1;i<=num;i++){
power=(power*i)%1000000007;
};
printf("%d",power);
return 0;
} | main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanif'; did you mean 'scanf'? [-Wimplicit-function-declaration]
6 | scanif("%f",&num);
| ^~~~~~
| scanf
main.c:8:32: error: invalid operands to binary % (have 'double' and 'int')
8 | ... |
s790403909 | p03796 | C | #include <stdio.h>
int main()
{
int num,i;
int power=1;
scanf("%d",&num);
for(i=1;i<=num;i++){
power=(power*i)%1000000007
};
printf("%d",power);
return 0;
} | main.c: In function 'main':
main.c:8:43: error: expected ';' before '}' token
8 | power=(power*i)%1000000007
| ^
| ;
9 | };
| ~
|
s574013183 | p03796 | C | #include <stdio.h>
int main()
{
int num,i;
int power=1;
scanf("%d",&num);
for(i=1;i<=num;i++){
power=power*i%1000000007
};
printf("%d",power);
return 0;
} | main.c: In function 'main':
main.c:8:41: error: expected ';' before '}' token
8 | power=power*i%1000000007
| ^
| ;
9 | };
| ~
|
s821657739 | p03796 | C | #include <stdio.h>
int main()
{
int num,i;
int power=1;
scanf("%d",&num);
for(i=1;i<=num;i++){
power=power*i mod 1000000007
};
printf("%d",power%1000000007);
return 0;
} | main.c: In function 'main':
main.c:8:30: error: expected ';' before 'mod'
8 | power=power*i mod 1000000007
| ^~~~
| ;
|
s026905788 | p03796 | C | #include <stdio.h>
int main()
{
int num,ans,i;
int power=1;
scanf("%d",&num);
for(i=1;i<=num;i++){
power=power*i;
};
ans=power%1000000007
printf("%d",ans);
return 0;
} | main.c: In function 'main':
main.c:11:29: error: expected ';' before 'printf'
11 | ans=power%1000000007
| ^
| ;
12 |
13 | printf("%d",ans);
| ~~~~~~
|
s489233648 | p03796 | C | #include <stdio.h>
int main(void)
{
int num,i;
int power=1;
scanf("%d",&num);
for(i=1;i<=num;i++){
power=power*i;
};
}
#include<math.h>
{
printf("%d",(power%1000000007));
return 0;
} | main.c:12:1: error: expected identifier or '(' before '{' token
12 | {
| ^
|
s171538257 | p03796 | C | #include <stdio.h>
int main()
{
int num,i;
int power=1;
scanf("%d",&num);
for(i=1;i<=num;i++){
power=power*i;
};
printf("%d\n",power%(10^9)+7;
return 0;
} | main.c: In function 'main':
main.c:11:32: warning: result of '10^9' is 3; did you mean '1e9'? [-Wxor-used-as-pow]
11 | printf("%d\n",power%(10^9)+7;
| ^
| ---
| 1e
main.c:11:30: note: you can silence th... |
s059163937 | p03796 | C | #include <stdio.h>
int main()
{
int num,i;
int power=1;
scanf("%d",&num);
for(i=1;i<=num;i++){
power=power*i;
};
Printf("%d\n",power%1000000009);
Return 0;
}
| main.c: In function 'main':
main.c:11:9: error: implicit declaration of function 'Printf'; did you mean 'printf'? [-Wimplicit-function-declaration]
11 | Printf("%d\n",power%1000000009);
| ^~~~~~
| printf
main.c:12:9: error: 'Return' undeclared (first use in this function)
12 | ... |
s230231676 | p03796 | C | #include <stdio.h>
int main()
{
int num,i;
int power=1;
scanf("%d",&num);
for(i=1;i<=num;i++){
power=power*i
};
Printf("%d\n",power%1000000009);
Return 0;
} | main.c: In function 'main':
main.c:8:30: error: expected ';' before '}' token
8 | power=power*i
| ^
| ;
9 | };
| ~
main.c:11:9: error: implicit declaration of function 'Printf'; did y... |
s410812834 | p03796 | C | #include <stdio.h>
int main()
{
int num,i;
int power=1;
scanf("%d",&num);
for(i=1;i<=num;i++){
power=power*i
}
Printf("%d\n",power%1000000009);
Return 0;
}
| main.c: In function 'main':
main.c:8:30: error: expected ';' before '}' token
8 | power=power*i
| ^
| ;
9 | }
| ~
main.c:11:9: error: implicit declaration of function 'Printf'; did yo... |
s344123159 | p03796 | C++ | #include <iostream>
int main() {
int N;
std::cin >> N;
int remainder = 1;
for (int i = 1; i <= N; i++) {
remainder *= i;
remainder = remainder % (int)(7+1e+9)
}
std::cout << remainder << std::endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:40: error: expected ';' before '}' token
9 | remainder = remainder % (int)(7+1e+9)
| ^
| ;
10 | }
| ~
|
s279169893 | p03796 | Java | public class Main {
public static int MOD = 1_000_000_000 + 7;
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 *= i;
power %= MOD;
}
System.out.println(power);
}
}
| Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s803402436 | p03796 | C++ | #include <iostream>
#include <math.h>
using namespace std;
int main()
{
int N, pre_p = cur_p = 1;
cin >> N;
for (int i = 1; i < N; i++)
{
pre_p = cur_p;
cur_p = pre_p * i;
}
cout << cur_p % (pow(10,9) + 7);
return 0;
} | a.cc: In function 'int main()':
a.cc:8:16: error: 'cur_p' was not declared in this scope
8 | int N, pre_p = cur_p = 1;
| ^~~~~
|
s507710297 | p03796 | C++ | include<stdio.h>
#define mod 1000000009
int main(void){
long long int N,i,ans=1;
scanf("%lld",&N);
for(i=1;i<=N;i++){
ans*=i;
ans%=mod;
}
printf("%lld\n",ans);
return 0;
} | a.cc:1:1: error: 'include' does not name a type
1 | include<stdio.h>
| ^~~~~~~
|
s990882690 | p03796 | C++ | include<stdio.h>
#define mod 1000000009
int main(void){
long long int N,i,ans=1;
scanf("%lld",&N);
for(i=1;i<=N;i++){
ans*=i;
ans%=mod;
}
printf("%d\n",ans);
return 0;
} | a.cc:1:1: error: 'include' does not name a type
1 | include<stdio.h>
| ^~~~~~~
|
s090992061 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define MOD (ll)1e9+7
#define MAX(X,Y) ((X)>(Y)?(X):(Y))
#define MIN(X,Y) ((X)<(Y)?(X):(Y))
int fact(int x)
{
int res = 1;
for(int i=1;i<=x;i++){
res *= i;
res %= CCC;
}
return res;
}
int main()
{
int x;
c... | a.cc: In function 'int fact(int)':
a.cc:14:16: error: 'CCC' was not declared in this scope
14 | res %= CCC;
| ^~~
|
s085678995 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
ll fact(int x)
{
ll res = 1;
for(int i=1;i<=x;i++){
res *= i;
while(res>1e9+7){
res-=(1e9+7);
}
}
return res;
}
int main()
{
int x;
cin>>x;
cout<<fact(x)<<endl
return 0;
} | a.cc: In function 'int main()':
a.cc:22:24: error: expected ';' before 'return'
22 | cout<<fact(x)<<endl
| ^
| ;
23 | return 0;
| ~~~~~~
|
s799955693 | p03796 | C++ | #include<iostream>
#include<math.h>
using namespace std;
int main() {
long long p = 1;
unsigned int n;
cin >> n;
for (unsigned int i = 1; i <= n; i++) {
p *= i;
}
cout << p % long long(1e9 + 7) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:16:21: error: expected primary-expression before 'long'
16 | cout << p % long long(1e9 + 7) << endl;
| ^~~~
|
s269771406 | p03796 | C++ | #include <iostream>
#include <cstdlib>
#include <string>
int amari(int N, int wari){
if (N == 1){
return 1;
}
return (N*amari(N-1))%wari;
}
int main(){
std::string line;
std::getline(std::cin, line);
int N = atoi(line.c_str());
std::cout << amari(N, 1000000000+7) << std::endl;
return 0;
} | a.cc: In function 'int amari(int, int)':
a.cc:10:16: error: too few arguments to function 'int amari(int, int)'
10 | return (N*amari(N-1))%wari;
| ~~~~~^~~~~
a.cc:5:5: note: declared here
5 | int amari(int N, int wari){
| ^~~~~
|
s602240552 | p03796 | C++ | n = int(input())
ans = 1
mod = 1000000007
for i in range(1, n+1):
ans = (ans * i) % mod
print(ans)
| a.cc:1:1: error: 'n' does not name a type
1 | n = int(input())
| ^
|
s180037129 | p03796 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
int n;
cin >> n;
int m = 1e9+7;
ll ans = 1LL;
for(int i = 1; i <= n; i++){
ans *= i;
ans = ans%m;
}
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:8:5: error: 'll' was not declared in this scope
8 | ll ans = 1LL;
| ^~
a.cc:10:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
10 | ans *= i;
| ^~~
| abs
a.cc:13:13: error: 'ans' was not declared in this sc... |
s961359029 | p03796 | C++ | #include <iostream>
#include<stdio.h>
using namespace std;
long long int modx(long int x,long int y);
int main(void) {
int N;
cin >> N;
long long int x = 1;
for (int i = 0; i < N; i++)
{
x = modx(x,i+1);
cout << x << endl;
}
getchar();
getchar();
}
long long int modx(long long int x,long long int y) {
lo... | /usr/bin/ld: /tmp/ccNmC2Ur.o: in function `main':
a.cc:(.text+0x43): undefined reference to `modx(long, long)'
collect2: error: ld returned 1 exit status
|
s664430648 | p03796 | C++ | ude<stdio.h>
#include<stdlib.h>
int n,a,b,c;
int main(void){
scanf("%d",&n);
a = n;
for(i == 0;i == n ;i++){
b = b + a*i;
}
c = b / (10*10*10*10*10*10*10*10*10 + 7);
printf("%d",c);
return 0;
} | a.cc:1:1: error: 'ude' does not name a type
1 | ude<stdio.h>
| ^~~
a.cc: In function 'int main()':
a.cc:8:1: error: 'scanf' was not declared in this scope
8 | scanf("%d",&n);
| ^~~~~
a.cc:10:5: error: 'i' was not declared in this scope
10 | for(i == 0;i == n ;i++){
| ^
a.cc:14:1: error:... |
s516068600 | p03796 | C++ | #include<stdio.h>
#include<stdlib.h>
int n,a,b,c;
int main(void){
scanf("%d",&n);
a = n
for(i == 0;i == n ;i++){
b = b + a*i;
}
c = b / (10*10*10*10*10*10*10*10*10 + 7)
printf("%d",c);
return 0;
} | a.cc: In function 'int main()':
a.cc:9:6: error: expected ';' before 'for'
9 | a = n
| ^
| ;
10 | for(i == 0;i == n ;i++){
| ~~~
a.cc:10:12: error: 'i' was not declared in this scope
10 | for(i == 0;i == n ;i++){
| ^
a.cc:13:41: error: expected ';' before 'print... |
s834839018 | p03796 | C | #include<stdio.h>
#define mod 1000000007
int main() {
int n = 0;
long long ans = 1;
scanf("%d", &n);
for(int i = 1; i <= n; i++) {
ans = (ans * i) % MOD;
}
printf("%ld\n", ans);
return 0;
} | main.c: In function 'main':
main.c:10:27: error: 'MOD' undeclared (first use in this function)
10 | ans = (ans * i) % MOD;
| ^~~
main.c:10:27: note: each undeclared identifier is reported only once for each function it appears in
|
s715448105 | p03796 | Java | import java.util.*;
import java.io.*;
public class TrsainingCamp{
public static final int MODULO= 1000000007;
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*i)%MODULO;
}
System.out.println(power);
... | Main.java:4: error: class TrsainingCamp is public, should be declared in a file named TrsainingCamp.java
public class TrsainingCamp{
^
1 error
|
s953484142 | p03796 | C | #include<stdio.h>
int main(void){
int i, time=0;
int syou=1000000007;
//sumを上5桁と下5桁で分割して管理する
unsigned __int64 sum=1;
scanf("%d", &time);
for(i = 0 ; i < time ; i++){
sum = sum * (i+1);
sum = sum%syou;
}
printf("%d", sum);
}
| main.c: In function 'main':
main.c:7:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sum'
7 | unsigned __int64 sum=1;
| ^~~
main.c:7:26: error: 'sum' undeclared (first use in this function)
main.c:7:26: note: each undeclared identifier is reported only once... |
s878056527 | p03796 | Java |
public class Main {
public static void main(String[] args) {
BigInteger power = BigInteger.ONE;
Scanner scanner = new Scanner(System.in);
BigInteger amount = scanner.nextBigInteger();
BigInteger v = BigInteger.valueOf(1000000007L);
for (BigInteger i = power; i.compareTo(amou... | Main.java:4: error: cannot find symbol
BigInteger power = BigInteger.ONE;
^
symbol: class BigInteger
location: class Main
Main.java:4: error: cannot find symbol
BigInteger power = BigInteger.ONE;
^
symbol: variable BigInteger
location: class Main
Main.java:... |
s254645674 | p03796 | C | #include<stdio.h>
int main(void){
int i, time=0;
int syou=1000000007;
//sumを上5桁と下5桁で分割して管理する
unsigned __int64 sum=1;
scanf("%d", &time);
for(i = 0 ; i < time ; i++){
sum = sum * (i+1);
sum = sum%syou;
}
printf("%d", sum);
}
| main.c: In function 'main':
main.c:7:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sum'
7 | unsigned __int64 sum=1;
| ^~~
main.c:7:26: error: 'sum' undeclared (first use in this function)
main.c:7:26: note: each undeclared identifier is reported only once... |
s744863566 | p03796 | C | #include <stdio.h>
int main(void){
long long n, p;
long long i;
scanf("%lld", &n);
p = 1;
for (i = 1; i <= n; i++){
p = p*i%(1e+7);
}
printf("%lld\n", p);
return 0;
} | main.c: In function 'main':
main.c:12:24: error: invalid operands to binary % (have 'long long int' and 'double')
12 | p = p*i%(1e+7);
| ~~~^
| |
| long long int
|
s671549319 | p03796 | C++ | #include <iostream>
using namespace std;
int main() {
long n,p,i, mod;
cin>>n;
p=1;
mod=1000000007
if (n>1){for (i=1; i<=n; i++) {p=(p*(i%mod)%mod);}}
else p=1;
cout << p % mod << '\n';
// your code goes here
return 0;
} | a.cc: In function 'int main()':
a.cc:7:15: error: expected ';' before 'if'
7 | mod=1000000007
| ^
| ;
8 | if (n>1){for (i=1; i<=n; i++) {p=(p*(i%mod)%mod);}}
| ~~
a.cc:9:1: error: 'else' without a previous 'if'
9 | else p=1;
| ^~~~
|
s011867683 | p03796 | C | <?php
fscanf(STDIN, "%d", $n);
$res = 1;
for ($i = 1; $i <= $n; ++$i) {
$res *= $i;
$res = $res % 1000000007;
}
echo $res . "\n"; | main.c:1:1: error: expected identifier or '(' before '<' token
1 | <?php
| ^
main.c:3:1: warning: data definition has no type or storage class
3 | $res = 1;
| ^~~~
main.c:3:1: error: type defaults to 'int' in declaration of '$res' [-Wimplicit-int]
main.c:4:1: error: expected identifier or '(' before... |
s694316060 | p03796 | C | <?php
fscanf(STDIN, "%d", $n);
$res = 1;
for ($i = 1; $i <= $n; ++$i) {
$res *= $i;
$res = $res % 1000000007;
}
echo $res . "\n"; | main.c:1:1: error: expected identifier or '(' before '<' token
1 | <?php
| ^
main.c:3:1: warning: data definition has no type or storage class
3 | $res = 1;
| ^~~~
main.c:3:1: error: type defaults to 'int' in declaration of '$res' [-Wimplicit-int]
main.c:4:1: error: expected identifier or '(' before... |
s252129268 | p03796 | C | <?php
fscanf(STDIN, "%d", $n);
$res = 1;
for ($i = 1; $i <= $n; ++$i) {
$res *= $i;
$res = $res % 1000000007;
}
echo $res . "\n"; | main.c:1:1: error: expected identifier or '(' before '<' token
1 | <?php
| ^
main.c:3:1: warning: data definition has no type or storage class
3 | $res = 1;
| ^~~~
main.c:3:1: error: type defaults to 'int' in declaration of '$res' [-Wimplicit-int]
main.c:4:1: error: expected identifier or '(' before... |
s759342954 | p03796 | C | <?php
fscanf(STDIN, "%d", $n);
$res = 1;
for ($i = 1; $i <= $n; ++$i) {
$res *= $i;
$res = $res % 1000000007;
}
echo $res . "\n"; | main.c:1:1: error: expected identifier or '(' before '<' token
1 | <?php
| ^
main.c:3:1: warning: data definition has no type or storage class
3 | $res = 1;
| ^~~~
main.c:3:1: error: type defaults to 'int' in declaration of '$res' [-Wimplicit-int]
main.c:4:1: error: expected identifier or '(' before... |
s584120702 | p03796 | C++ | #include <iostream>
using namespace std;
int main()
{
_int64 n;
_int64 i;
_int64 o;
cin >> n;
o = 1;
for (i = 1; i <= n; i++)
o = o*i;
cout << o%1000000007 << endl;
} | a.cc: In function 'int main()':
a.cc:6:9: error: '_int64' was not declared in this scope
6 | _int64 n;
| ^~~~~~
a.cc:8:15: error: expected ';' before 'i'
8 | _int64 i;
| ^~
| ;
a.cc:10:15: error: expected ';' before 'o'
10 | _int64... |
s952070092 | p03796 | C++ |
int N;
cin >> N;
if((N<1)||(N>100001)){
return 0;
}
int i;
int poi=1;
double po=1.0;
for(i=1; i<=N ; i++){
po=po*i;
// if(poi>=(pow(9.0,10)+7)){
// po=(double)poi;
// po=po/(1000000000.0+7.0);
// poi=(int)po;
// }
}
poi=(int)(po/(pow(9.0,10.0)+7.0)... | a.cc:4:3: error: 'cin' does not name a type
4 | cin >> N;
| ^~~
a.cc:5:3: error: expected unqualified-id before 'if'
5 | if((N<1)||(N>100001)){
| ^~
a.cc:12:3: error: expected unqualified-id before 'for'
12 | for(i=1; i<=N ; i++){
| ^~~
a.cc:12:12: error: 'i' does not name a typ... |
s224568876 | p03796 | C++ | #include <iostream>
using namespace std;
int mod = 1000000007;
int main() {
// your code goes here
int N;
cin >> N;
for(long long i= 1,j = 1;i <= N;i++){
j *= i;
j %= mod;
}
cout << j << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:13:17: error: 'j' was not declared in this scope
13 | cout << j << endl;
| ^
|
s887516378 | p03796 | C | #include<stdio.h>
int main(void)
{
int num;
int i;
int result = 1;
scanf("%d", &num);
for(i=1; i <= num; i++){
result *= i;
}
printf("%d\n", result % (1000000000 + 7));
return 0;
}
#include<stdio.h>
int main(void)
{
long int num;
long int i;
long int result = 1;
scanf("%ld", &num);
for(i=1; i <= num;... | main.c:18:5: error: redefinition of 'main'
18 | int main(void)
| ^~~~
main.c:3:5: note: previous definition of 'main' with type 'int(void)'
3 | int main(void)
| ^~~~
|
s858641427 | p03796 | C++ | #include <iostream>
using namespace std;
int main(void){
int N;
cin >> N;
int p = 1;
for(int i=1;i<=N;i++){
p = p * i;
}
int a = p % (1000000007);
cout << a << endl;
} | a.cc:10:1: error: extended character is not valid in an identifier
10 | int a = p % (1000000007);
| ^
a.cc:10:1: error: extended character is not valid in an identifier
a.cc: In function 'int main()':
a.cc:10:1: error: '\U00003000\U00003000' was not declared in this scope
10 | int a = p % (1000000... |
s175990600 | p03796 | C | #include<stdio.h>
#include<math.h>
int main(void){
int n,i,y;
scanf("%d",&n);
for(i=1;i<=n;i++){
y=y*i;
}
y=y%pow(10,9)+7;
printf("%d",y);
return 0;
} | main.c: In function 'main':
main.c:11:6: error: invalid operands to binary % (have 'int' and 'double')
11 | y=y%pow(10,9)+7;
| ^~~~~~~~~~
| |
| double
|
s647623325 | p03796 | C++ | #include <stdio.h>
int main(void){
double n=1;
scanf("%f",&n);
for(int i=0;i<n;i++){
n=n*i;
}
printf("%f\n",n%(1000000000+7));
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:24: error: invalid operands of types 'double' and 'int' to binary 'operator%'
9 | printf("%f\n",n%(1000000000+7));
| ~^~~~~~~~~~~~~~~
| | |
| double int
|
s904805437 | p03796 | C | #include<stdio.h>
#include<math.h>
int main(void){
int n,y=1;
scanf("%d",&n);
for(int i=1;i<=n;i++){
y=y*i;
}
printf("%d",y%pow(10,9)+7);
return 0;
} | main.c: In function 'main':
main.c:11:15: error: invalid operands to binary % (have 'int' and 'double')
11 | printf("%d",y%pow(10,9)+7);
| ^~~~~~~~~~
| |
| double
|
s528594140 | p03796 | C++ | #include <iostream>
using namespace std;
int main() {
int n, p, i;
cin >> n;
p = 1;
for (i = 1; i <= n; i++) {p = p * i;}
cout << p % 1000000007 << '\n';
// your code goes here
return 0;
} | a.cc:3:1: error: extended character is not valid in an identifier
3 |
| ^
a.cc:3:1: error: '\U000000a0' does not name a type
3 |
| ^
|
s721216671 | p03796 | C++ | #include <iostream>
using namespace std;
int main() {
int n, p, i;
cin >> n;
p = 1;
for (i = 1; i <= n; i++) p = p * i;
cout << p % 1000000007 << '\n';
// your code goes here
return 0;
} | a.cc:3:1: error: extended character is not valid in an identifier
3 |
| ^
a.cc:3:1: error: '\U000000a0' does not name a type
3 |
| ^
|
s492223898 | p03796 | C++ | #include <iostream>
using namespace std;
int main() {
int n, p, i;
cin >> n;
p = 1;
for (i = 1; i <= n; i++) p *= i;
cout << p % (1000000007) << '\n';
// your code goes here
return 0;
} | a.cc:3:1: error: extended character is not valid in an identifier
3 |
| ^
a.cc:3:1: error: '\U000000a0' does not name a type
3 |
| ^
|
s247628798 | p03796 | C++ | #include<stdio.h>
int main(){
int N, i, j=1, ;
scanf("%d", &N);
for(i=1;i<=N;i++){
j = j * i;
}
if (j >= 1000000007)
j = j % 1000000007;
printf("%d", j);
} | a.cc: In function 'int main()':
a.cc:4:24: error: expected unqualified-id before ';' token
4 | int N, i, j=1, ;
| ^
|
s809345218 | p03796 | C++ | #include<stdio.h>
#include<math.h>
int main(){
int n, fact,i;
fact = 1;
scanf("%d", &n);
for(i=1; i<=n; ++i) {
fact = fact * i;
};
printf("% | a.cc:13:10: warning: missing terminating " character
13 | printf("%
| ^
a.cc:13:10: error: missing terminating " character
13 | printf("%
| ^~
a.cc: In function 'int main()':
a.cc:13:10: error: expected primary-expression at end of input
13 | printf("%
| ^
a.c... |
s962780933 | p03796 | C++ | include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
using namespace std;
int main(){
int n;
long long ans;
scanf(" %d",&n);
ans=1;
for(int i=2;i<=n;i++){
ans=(ans*(long long)i)%1000000007;
}
printf("%lld\n",ans%1000000007);
return 0;
}
| a.cc:1:1: error: 'include' does not name a type
1 | include<iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/algorithm:60,
from a.cc:3:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __g... |
s098986039 | p03796 | C++ | #include<cstdio>
__int64 rank(__int64 n)
{
for (__int64 i=n-1;i>1;i--)
{
n*=i;
n=n%1000000007;
}
return n;
}
int main()
{
__int64 n;
while (scanf("%I64d",&n)==1)
{
printf("%I64d\n",rank(n));
}
return 0;
}
| a.cc:2:1: error: '__int64' does not name a type; did you mean '__int64_t'?
2 | __int64 rank(__int64 n)
| ^~~~~~~
| __int64_t
a.cc: In function 'int main()':
a.cc:13:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
13 | __int64 n;
| ^~~~~~~
| ... |
s378606328 | p03796 | C++ | #include "bits/stdc++.h"
#include
using namespace std;
int main(void)
{
int n,p=1;
cin >> n;
for(int i=1;i<=n;i++){
p*=i;
}
cout << p%((int)(pow(10,9))+7) << endl;
return 0;
}
| a.cc:2:9: error: #include expects "FILENAME" or <FILENAME>
2 | #include
| ^
|
s292673498 | p03796 | C++ | #include "bits/stdc++.h"
using namespace std;
int main(void)
{
int n,p=1;
cin >> n;
for(int i=1;i<=n;i++){
p*=i;
}
cout << p%(pow(10,9)+7) << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:18: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
10 | cout << p%(pow(10,9)+7) << endl;
| ~^~~~~~~~~~~~~~
| | |
| int ... |
s488072312 | p03796 | C++ | #include "stdafx.h"
#include <iostream>
#include <stdint.h>
#include <string>
using namespace std;
uint64_t ppow = 1000000000 + 7;
int main()
{
uint64_t out = 1;
int N;
cin >> N;
for (uint64_t i = 1;i <= N;i++) {
out = (out * i) % ppow;
}
cout << out;
return 0;
} | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s601038707 | p03796 | C++ | int N;
cin >> N;
long long int p = 1;
for (int i = 1; i <= N; i++)
{
p *= i;
p %= 1000000007;
}
cout << p;
| a.cc:2:9: error: 'cin' does not name a type
2 | cin >> N;
| ^~~
a.cc:4:9: error: expected unqualified-id before 'for'
4 | for (int i = 1; i <= N; i++)
| ^~~
a.cc:4:25: error: 'i' does not name a type
4 | for (int i = 1; i <= N; i++)
| ... |
s851228832 | p03796 | C++ | #include <iostream.
using namespace std;
int main()
{
int N;
cin >> N;
int p = 1;
for (int i = 0; i < N; i++)
p = p * i % 1000000007;
cout << p << endl;
return 0;
}
| a.cc:1:20: error: missing terminating > character
1 | #include <iostream.
| ^
a.cc:1:10: fatal error: iostream.: No such file or directory
1 | #include <iostream.
| ^
compilation terminated.
|
s271140426 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
int n;
cin >> n;
int ans = 1;
for(int i = 1; i <= n; i++){
ans *= i;
ans %= 1e9 + 7;
}
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:12:21: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
12 | ans %= 1e9 + 7;
| ~~~~^~~~~~~~~~
a.cc:12:21: note: in evaluation of 'operator%=(long long int, double)'
|
s932758110 | p03797 | C++ | #include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main ()
{
ll x,y;
cin>>x>>y;
m=(y-2*x);
cout<<(x+(m/4));
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:3: error: 'm' was not declared in this scope
9 | m=(y-2*x);
| ^
|
s364784952 | p03797 | C++ | #include <iostream>
using namespace std;
int main() {
int64_t N, M;
cin >> N >> M;
int64_t dum = max((M - N * 2) / 4, 0LL);
N += dum;
M -= dum * 2;
cout << min(N, M / 2) << endl;
}
| a.cc: In function 'int main()':
a.cc:9:20: error: no matching function for call to 'max(int64_t, long long int)'
9 | int64_t dum = max((M - N * 2) / 4, 0LL);
| ~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale... |
s645599045 | p03797 | C++ |
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n , a , s=0;
cin>>n>>a;
if(a >= 2*n) {
s = n;
a -= 2*n;
s += m / 4;
cout << s << "\n";
}
else {
cout << a / 2 << "\n";
}
}
| a.cc: In function 'int main()':
a.cc:11:14: error: 'm' was not declared in this scope
11 | s += m / 4;
| ^
|
s244214756 | p03797 | C | #include<cstdio>
int main() {
long long n,m;
scanf("%lld%lld", &n, &m);
if (2*n > m) printf("%lld", m/2);
else printf("%lld", n+(m-n*2)/4);
return 0;
} | main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s082811729 | p03797 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N,M;cin >> N >> M;
int ans;
if(M >= 2 * N){
ans = N;
M -= 2 * N;
ans += M / 4;
}
else
ans = min(n,M / 2);
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:12:15: error: 'n' was not declared in this scope
12 | ans = min(n,M / 2);
| ^
|
s866013614 | p03797 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long N,M;
if(M>=N*2){
cout<<N+(M-2*N)/3<<endl;
}
else{
cout<<M/2<<endl;
}
| a.cc: In function 'int main()':
a.cc:10:2: error: expected '}' at end of input
10 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s510796795 | p03797 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
ll n,m;
cin >> n >> m;
ll ans;
if ( n == 2 * m ) {//cがたらんou ピッタリ
ans = m/2;
} else if ( n > 2 * m ) {
ans = m/2;
n -= ans;
ans += (n/2);
} else #include <bits/stdc++.h>
using namespace std;
typedef long long l... | a.cc:17:10: error: stray '#' in program
17 | } else #include <bits/stdc++.h>
| ^
a.cc:54:10: error: stray '#' in program
54 | } else #include <bits/stdc++.h>
| ^
a.cc: In function 'int main()':
a.cc:17:11: error: 'include' was not declared in this scope
17 | } else #include ... |
s679093450 | p03797 | C++ | #include<bits/stdc++.h>
int main(){long long n,m;std::cin>>n>>m;std::cout<<min(n+m/2,m)/2;} | a.cc: In function 'int main()':
a.cc:2:52: error: 'min' was not declared in this scope; did you mean 'std::min'?
2 | int main(){long long n,m;std::cin>>n>>m;std::cout<<min(n+m/2,m)/2;}
| ^~~
| std::min
... |
s811653584 | p03797 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long n,m;
cin>>n>>m;
long long answer=min(n,m/2);
m=m-answer*2;
answer=answer+m/4;
cout<<answer<endl;
} | a.cc: In function 'int main()':
a.cc:9:21: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>')
9 | cout<<answer<endl;
| ~~~~~~~~~~~~^~~~~
In file included from /usr/include/c... |
s187147778 | p03797 | Java | import java.util.*;
public class SccPuzzle {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long s = sc.nextLong();
long c = sc.nextLong();
long scc = 0;
if(s>=c/2) {
scc = c/2;
}else {
scc += s;
c -= 2*s;
scc += c/4;
}
System.out.println(scc);
}
... | Main.java:3: error: class SccPuzzle is public, should be declared in a file named SccPuzzle.java
public class SccPuzzle {
^
1 error
|
s045252590 | p03797 | C++ | #include<iostream>
int main()
{
int n,m;
std::cin>>n>>m;
std::cout<<min(n+m/2,m)/2;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:16: error: 'min' was not declared in this scope; did you mean 'std::min'?
6 | std::cout<<min(n+m/2,m)/2;
| ^~~
| std::min
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_cl... |
s264702276 | p03797 | C++ | #include<iostream>
int main()
{
int n,m;
cin>>n>>m;
cout<<min(n+m/2,m)/2;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin>>n>>m;
| ^~~
| 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... |
s355460369 | p03797 | C++ | #include<iostream> using namespace std;long long n,m;int main(){cin>>n>>m;cout<<min(n+m/2,m)/2;} | a.cc:1:20: warning: extra tokens at end of #include directive
1 | #include<iostream> using namespace std;long long n,m;int main(){cin>>n>>m;cout<<min(n+m/2,m)/2;}
| ^~~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): und... |
s501197337 | p03797 | C++ | #include<iosstream> using namespace std;long long n,m;int main(){cin>>n>>m;cout<<min(n+m/2,m)/2;} | a.cc:1:21: warning: extra tokens at end of #include directive
1 | #include<iosstream> using namespace std;long long n,m;int main(){cin>>n>>m;cout<<min(n+m/2,m)/2;}
| ^~~~~
a.cc:1:9: fatal error: iosstream: No such file or directory
1 | #include<iosstream> using namespace std;long long ... |
s466491100 | p03797 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int64_N,M;
cin>>N>>M;
if((M/2)<=N)
cout<<M/2<<endl;
else{
int64_t ans=(N+(M/2))/2;
cout<<ans<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:4:1: error: 'int64_N' was not declared in this scope; did you mean 'int64_t'?
4 | int64_N,M;
| ^~~~~~~
| int64_t
a.cc:4:9: error: 'M' was not declared in this scope
4 | int64_N,M;
| ^
a.cc:5:8: error: 'N' was not declared in this scope
5 | cin... |
s294595262 | p03797 | C++ | import java.util.*;
import java.io.*;
public class Main{
static int repow(int b,int p){
long a = b;
long res=1;
while(p>0){
if(p%2==1){
res*=a;
}
a*=a;
p/=2;
}
return (int)res;
}
static int repow(int b,int p,int modder){
long a = b%modder;
long res=1;
... | a.cc:358:7: error: stray '@' in program
358 | @SuppressWarnings("unchecked")
| ^
a.cc:384:7: error: stray '@' in program
384 | @SuppressWarnings("unchecked")
| ^
a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'impor... |
s356788478 | p03797 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
ll n, m;cin>>n>>m;
ll ans=min(n, m/2);
m = max(0, m - n*2);
ans += m / 4;
cout << ans;
}
| a.cc: In function 'int main()':
a.cc:9:10: error: no matching function for call to 'max(int, ll)'
9 | m = max(0, m - n*2);
| ~~~^~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1... |
s630891030 | p03797 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <cmath>
#include <map>
#include <iomanip>
typedef long long ll;
#define rep(i,a,b) for(int i=a;i<b;++i)
#define rrep(i,a,b) for(int i=a;i>=b;--i)
using namespace std;
ll mod = 1e9 + 7;
using namespace std;
using Graph = vector<vector... | a.cc: In function 'int main()':
a.cc:29:38: error: 'N' was not declared in this scope
29 | cout << S + (M - 2 * N) / 4 << endl;
| ^
|
s022914662 | p03797 | C++ | #include<bits/stdc++.h>
using namespace std;
long long n,m;
int main()
{
cin>>n>>m;
cout<<min(n,m/2)+max(m-n*2,0)/4;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:25: error: no matching function for call to 'max(long long int, int)'
7 | cout<<min(n,m/2)+max(m-n*2,0)/4;
| ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc... |
s854000503 | p03797 | C++ | #include<bits/stdc++.h>
using namespace std;
long long n,m;
int main()
{
cin>>n>>m;
cout<<min(n,m/2)+max(m-n*2,0)/4;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:25: error: no matching function for call to 'max(long long int, int)'
7 | cout<<min(n,m/2)+max(m-n*2,0)/4;
| ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc... |
s081341774 | p03797 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define ALL(a) (a).begin(), (a).end()
template <class T> inline bool chmin(T &a, T b)
{
if (a > b)
{
a = b;
return true;
}
return false;
}
template <class T> inline bool chmax(T &a, T b)
{
if (a < b)
{
... | a.cc: In function 'int main()':
a.cc:207:16: error: no matching function for call to 'max(int, ll)'
207 | ll ans2 = max(0, (m - 2ll*ans1)/4ll);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc+... |
s258471809 | p03797 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
long long N,M;
cin>>N>>M;
if(2*N>=M){
cout<<M/2<<endl;
}else{
x=M-2*N;
cout<<(M-2*x/3)/2<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:10:5: error: 'x' was not declared in this scope
10 | x=M-2*N;
| ^
|
s434730018 | p03797 | C++ | #include <iostream>
#include <vector>
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define bg begin()
#define ed end()
#define all(x) x.bg, x.... | a.cc: In function 'int main()':
a.cc:146:12: error: expected primary-expression before '<<' token
146 | cout<< m/<<endl;
| ^~
|
s887234988 | p03797 | C++ | #include <iostream>
#include <vector>
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define bg begin()
#define ed end()
#define all(x) x.bg, x.... | a.cc: In function 'int main()':
a.cc:146:7: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
146 | cout>>m/2>>endl;
| ~~~~^~~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:146:7: note: candid... |
s477779516 | p03797 | C++ | #include<bits/stdc++.h>
using names#include<bits/stdc++.h>
using namespace std;
long long n,m;
int main(){
scanf("%lld%lld",&n,&m);
if(n*2>m){
printf("%lld\n",m/2);
exit(0);
}
else{
long long ans=n;
m-=n*2;
ans+=m/4;
printf("%lld\n",ans);
}
return 0;
}pace std;
int main()
{
long long s,c,n=0;
... | a.cc:3:12: error: stray '#' in program
3 | using names#include<bits/stdc++.h>
| ^
a.cc:30:2: error: stray '#' in program
30 | }#include<bits/stdc++.h>
| ^
a.cc:3:7: error: expected nested-name-specifier before 'names'
3 | using names#include<bits/stdc++.h>
| ^~~~~
a.cc:19:... |
s708934342 | p03797 | C++ | include <iostream>
using namespace std;
int main()
{
long long n , m , javab;
cin >> n >> m;
if (m > (2 * n))
{
m -= (2 * n);
javab= (n + (m / 4));
}
else
javab = (m / 2);
cout << ans;
} | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope
8 | cin >> n >> m;
| ^~~
a.cc:16:9: error: 'cout' was not declared in this scope
16 | cout << ans;
|... |
s348238239 | p03797 | C++ | #include <bits\stdc++.h>
using namespace std;
int main()
{
long long n , m , ans , b;
cin >> n >> m;
if (m > (2 * n))
{
m -= (2 * n);
ans = (n + (m / 4));
}
else
ans = (m / 2);
cout << ans;
} | a.cc:1:10: fatal error: bits\stdc++.h: No such file or directory
1 | #include <bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s595117052 | p03797 | C++ | v#include <bits/stdc++.h>
using namespace std;
int main() {
long long N, M;
cin >> N >> M;
long long ans = 0;
ans += min(N, M/2);
M -= 2*ans;
if (M > 0) ans += M/4;
cout << ans << endl;
}
| a.cc:1:2: error: stray '#' in program
1 | v#include <bits/stdc++.h>
| ^
a.cc:1:1: error: 'v' does not name a type
1 | v#include <bits/stdc++.h>
| ^
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
6 | cin >> N >> M;
| ^~~
a.cc:8:10: error: 'min' wa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.