submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s065929732 | p03795 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
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)... | Main.java:12: error: incompatible types: possible lossy conversion from double to int
int ans = pow % (Math.pow(10.0,9.0)+7.0);
^
Main.java:14: error: cannot find symbol
System.out.println(ans);
^
symbol: variable ans
location: class Main
2 errors
|
s052752600 | p03795 | Java | import java.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System. in);
int n = sc.nextInt();
x = 800 * n;
y = n / 15 * 200;
x - y = ans;
System.out.println(ans);
}
}
| Main.java:1: error: package java does not exist
import java.*;
^
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System. in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System. in);
^... |
s089389131 | p03795 | Java | public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System. in);
int n = sc.nextInt();
x = 800 * n;
y = n / 15 * 200;
x - y = ans;
println(ans); | Main.java:8: error: reached end of file while parsing
println(ans);
^
1 error
|
s029742910 | p03795 | C | #include <stdio.h>
int main(void){
int n;
scanf("%d", &n);
a = n * 800 - (n / 15) * 200;
printf("%d\n", a);
return 0;
}
| main.c: In function 'main':
main.c:6:3: error: 'a' undeclared (first use in this function)
6 | a = n * 800 - (n / 15) * 200;
| ^
main.c:6:3: note: each undeclared identifier is reported only once for each function it appears in
|
s150229977 | p03795 | Java | package spring21;
public class ABC055_A {
public static void main(String[] args){
int N=20,x,y;
x=N*800;
y=200*(N/15);
System.out.println(x-y);
}
} | Main.java:3: error: class ABC055_A is public, should be declared in a file named ABC055_A.java
public class ABC055_A {
^
1 error
|
s126652378 | p03795 | C++ | n=gets.to_i
puts 800*n-200*(n/15) | a.cc:1:1: error: 'n' does not name a type
1 | n=gets.to_i
| ^
|
s045573567 | p03795 | C++ | import java.util.*;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int x = 0, y = 0;
for(int i = 1; i <= N; i++){
x += 800;
if(i % 15 == 0) y += 200;
... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
2 | public class Main {
| ^~~~~~
|
s891985667 | p03795 | C | #include <stdio.h>
int main() {
int n;
scanf_s("%d", &n);
printf("%d\n", n * 800 - n / 15 * 200);
return 0;
} | main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | scanf_s("%d", &n);
| ^~~~~~~
| scanf
|
s771411166 | p03795 | Java | import java.util.Scanner;
public class Restaurant {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int in = scan.nextInt();
System.out.println(in * 800 - (in/15)*200);
scan.close();
}
} | Main.java:3: error: class Restaurant is public, should be declared in a file named Restaurant.java
public class Restaurant {
^
1 error
|
s311668273 | p03795 | Java | import java.util.Scanner;
public class Restaurant {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int in = scan.nextInt();
System.out.println(in * 800 - (in/15)*200);
scan.close();
}
}
| Main.java:3: error: class Restaurant is public, should be declared in a file named Restaurant.java
public class Restaurant {
^
1 error
|
s992025623 | p03795 | Java | public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int in = scan.nextInt();
System.out.println(in * 800 - (in/15)*200);
} | Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
^
(use --enable-preview to enable unnamed classes)
1 error
|
s642503900 | p03795 | Java | import java.util.Scanner;
public class Restaurant {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int in = scan.nextInt();
System.out.println(in * 800 - (in/15)*200);
}
} | Main.java:3: error: class Restaurant is public, should be declared in a file named Restaurant.java
public class Restaurant {
^
1 error
|
s319566855 | p03795 | Java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package atcoderjava;
import java.util.Scanner;
/**
*
* @author takaesumizuki
*/
public class AtcoderJava {
/**
* @param ... | Main.java:14: error: class AtcoderJava is public, should be declared in a file named AtcoderJava.java
public class AtcoderJava {
^
Main.java:23: warning: [removal] Integer(String) in Integer has been deprecated and marked for removal
Integer eat = new Integer(str);
^
1 error
1 warni... |
s258149920 | p03795 | C | #include<stdio.h>
int main()
{
int s,c;
int q,w;
int e,r;
scanf_s("%d",&s);
scanf_s("%d",&c);
q=s*2;
/* if(c>q)
{
w=c-q;
e=w/4;
r=e+s;
printf("%d",r);
}*/
if(c<=q)
{
if(0==c%2)
{
w=c/2;
printf("%d",w);
}
if(0!=c%2)
{
c--;
w=c/2;
printf("%d",w);
}
}
} | main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
7 | scanf_s("%d",&s);
| ^~~~~~~
| scanf
|
s625591134 | p03795 | C++ | #include<stdio.h>
int main()
{
int s,c;
int q,w;
int e,r;
scanf_s("%d",&s);
scanf_s("%d",&c);
q=s*2;
if(c>q)
{
w=c-q;
e=w/4;
r=e+s;
printf("%d",r);
}
if(c==q)
{
printf("%d",s);
}
if(c<q)
{
if(0==c%2)
{
w=c/2;
printf("%d",w);
}
if(0!=c%2)
{
c--;
w=c/2;
printf("%d",w);
}... | a.cc: In function 'int main()':
a.cc:7:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
7 | scanf_s("%d",&s);
| ^~~~~~~
| scanf
|
s271571916 | p03795 | C++ | #include<stdio.h>
int main()
{
int s,c,q,w,e,r;
scanf_s("%d",&s);
scanf_s("%d",&c);
q=s*2;
if(c>q)
{
w=c-q;
e=w/4;
r=e+s;
printf("%d",r);
}
if(c==q)
{
printf("%d",s);
}
if(c<q)
{
if(0==c%2)
{
w=c/2;
printf("%d",w);
}
if(0!=c%2)
{
c--;
w=c/2;
printf("%d",w);
}
}
} | a.cc: In function 'int main()':
a.cc:5:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
5 | scanf_s("%d",&s);
| ^~~~~~~
| scanf
|
s412944500 | p03795 | C++ | #include <iostream>
#include <cmath>
int main() {
int N;
std::cin >> N;
int remainder = 1;
for (int i = 1; i <= N; i++) {
remainder *= i;
}
remainder = remainder%pow(10, 9) + 7;
std::cout << remainder << std::endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:22: error: invalid operands of types 'int' and 'double' to binary 'operator%'
10 | remainder = remainder%pow(10, 9) + 7;
| ~~~~~~~~~^~~~~~~~~~~
| | |
| int double
|
s995386216 | p03795 | C++ | #include <iostream>
#include <cmath>
int main() {
int N;
std::cin >> N;
int remainder = 1;
for (int i = 1; i <= N; i++) {
remainder *= i;
}
remainder = remainder%pow(10, 9) + 7
std::cout << remainder << std::endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:22: error: invalid operands of types 'int' and 'double' to binary 'operator%'
10 | remainder = remainder%pow(10, 9) + 7
| ~~~~~~~~~^~~~~~~~~~~
| | |
| int double
|
s906923542 | p03795 | C++ | #include <iostream>
int main() {
int N;
std::cin >> N;
int remainder = 1;
for (int i = 1; i <= N; i++) {
remainder *= i;
remainder = (double)remainder % (10e+9 +7);
}
std::cout << remainder << std::endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:33: error: invalid operands of types 'double' and 'double' to binary 'operator%'
9 | remainder = (double)remainder % (10e+9 +7);
| ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
| | |
| double ... |
s422812051 | p03795 | C++ | #include <iostream>
int main() {
int N;
std::cin >> N;
int remainder = 1;
for (int i = 1; i <= N; i++) {
remainder *= i;
remainder = remainder % (10e+9 +7);
}
std::cout << remainder << std::endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:25: error: invalid operands of types 'int' and 'double' to binary 'operator%'
9 | remainder = remainder % (10e+9 +7);
| ~~~~~~~~~ ^ ~~~~~~~~~~
| | |
| int double
|
s821226717 | p03795 | C++ | #include <iostream>
int main() {
int N;
std::cin >> N;
int remainder = 1;
for (int i = 1; i <= N; i++) {
remainder *= i
remainder = remainder % (10e+9 +7);
}
std::cout << remainder << std::endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:17: error: expected ';' before 'remainder'
8 | remainder *= i
| ^
| ;
9 | remainder = remainder % (10e+9 +7);
| ~~~~~~~~~
|
s398492096 | p03795 | C++ | #include <iostream>
int main() {
int x=0, y=0, N=0;
std::cin >> N;
x = 800*N;
int z = N/15;
y = z*200;
reutrn (x-y);
} | a.cc: In function 'int main()':
a.cc:11:1: error: 'reutrn' was not declared in this scope
11 | reutrn (x-y);
| ^~~~~~
|
s902037778 | p03795 | C++ | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <cmath>
#include <map>
#include <fstream>
#include <copy>
#define rep(i,a,n) for(int i=a;i<n;i++)
using namespace std;
typedef l... | a.cc:14:10: fatal error: copy: No such file or directory
14 | #include <copy>
| ^~~~~~
compilation terminated.
|
s055190911 | p03795 | C++ | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <cmath>
#include <map>
#include <fstream>
#define rep(i,a,n) for(int i=a;i<n;i++)
using namespace std;
typedef long long ll;
typ... | a.cc: In function 'std::ostream& operator<<(std::ostream&, const std::vector<_Tp>&)':
a.cc:25:44: error: 'ostream_iterator' is not a member of 'std'
25 | std::copy(v.begin(), v.end(), std::ostream_iterator<T>(out, ", "));
| ^~~~~~~~~~~~~~~~
a.cc:14:1: note: 's... |
s434757570 | p03795 | C++ | #include<iostream>
using namespace std;
int main(){
long long a,b;
std::cin>>a>>b;
if(a=>(b/2)){
std::cout<<(b/2);
}else{
std::cout<<(a+((b-2*a)/4));
}
} | a.cc: In function 'int main()':
a.cc:6:14: error: expected primary-expression before '>' token
6 | if(a=>(b/2)){
| ^
|
s087270844 | p03795 | C++ | #include <iostream>
#include <math.h>
using namespace std;
int main()
{
int N, pre_p = 1, 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:16:19: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
16 | cout << cur_p % (pow(10,9) + 7);
| ~~~~~ ^ ~~~~~~~~~~~~~~~
| | |
| int ... |
s910034080 | p03795 | C++ |
x = N * 800;
y = N / 15 * 200
print(x-y) | a.cc:2:1: error: 'x' does not name a type
2 | x = N * 800;
| ^
a.cc:3:1: error: 'y' does not name a type
3 | y = N / 15 * 200
| ^
|
s608426091 | p03795 | C++ | #include <iostream>
#include<stdio.h>
using namespace std;
int main(void) {
int N;
cin >> N;
int x = 1;
for (int i = 0; i < N; i++)
{
x = modx(x,N+1);
}
cout << x << endl;
}
int modx(int x,int y) {
return (x*y) % 1000000007;
} | a.cc: In function 'int main()':
a.cc:11:21: error: 'modx' was not declared in this scope
11 | x = modx(x,N+1);
| ^~~~
|
s532190925 | p03795 | C++ | #include<iostream>
using namespace std;
int main(){
int n,sum;
cin>>n;
sum=800*n;
sum-=200*(n/15)
cout<<sum<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:16: error: expected ';' before 'cout'
11 | sum-=200*(n/15)
| ^
| ;
12 |
13 | cout<<sum<<endl;
| ~~~~
|
s167942659 | p03795 | C++ | import Control.Applicative
main = do
n <- readLn :: IO Int
putStrLn $ show $ n * 800 - n `div` 15 * 200 | a.cc:5:35: error: stray '`' in program
5 | putStrLn $ show $ n * 800 - n `div` 15 * 200
| ^
a.cc:5:39: error: stray '`' in program
5 | putStrLn $ show $ n * 800 - n `div` 15 * 200
| ^
a.cc:1:1: error: 'import' does not n... |
s765208203 | p03795 | C | #include<stdio.h>
int main()
{
int i;
scanf("%d",&i);
print("%d",i*800-i/15*200);
return 0;
} | main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
6 | print("%d",i*800-i/15*200);
| ^~~~~
| printf
|
s432447211 | p03795 | C++ | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);
int N = cin.nextInt();
int x = N * 800;
int y = (N / 15) * 200;
System.out.println(x - y);
}
} | 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:2:1: error: expected unqualified-id before 'public'
2 | public class Main {
| ^~~~~~
|
s470170695 | p03795 | C++ | #include <stdafx.h>
#include <stdio.h>
int main () {
long long int N,i;
int a[10000],b[10000],c,j,k;
scanf("%lld", &N);
char S[10000],T[10000];
scanf("%s", S);
for(i=0;i<N;i++){
if (S[i]=='o') a[i]=1;
if (S[i]=='x') a[i]=-1;
}
for(j=-1;j<=1;j=j+2){
for(k=-1;k<=1;k=k+2){
b[0]=j, b[1]=k;
for(i=0;i<N-2;i++){
if(b[i+1]*a[i... | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include <stdafx.h>
| ^~~~~~~~~~
compilation terminated.
|
s719975365 | p03795 | Java | package ABC;
import java.util.Scanner;
public class ABC055A {
public static void main(){
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();
System.out.println((N*800)-(N/15));
}
}
| Main.java:5: error: class ABC055A is public, should be declared in a file named ABC055A.java
public class ABC055A {
^
1 error
|
s852855184 | p03795 | C++ | #include <iostream>
int main()
{
int N=0;
std::cin >> N;
int sum=0;
for(int i=1;i<N+1;i++)
{
sum+=800;
if(i % 15 == 0)
sum-=200;
}
sum >> std::cout >> std::endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:18:5: error: no match for 'operator>>' (operand types are 'int' and 'std::ostream' {aka 'std::basic_ostream<char>'})
18 | sum >> std::cout >> std::endl;
| ~~~ ^~ ~~~~~~~~~
| | |
| int std::ostream {aka std::basic_ostream<char>}
a.cc:18:5: note:... |
s358377992 | p03795 | C++ | #include <iostream>
int main()
{
int N=0;
N << std::cin;
int sum=0;
for(int i=1;i<N+1;i++)
{
sum+=800;
if(i % 15 == 0)
sum-=200;
}
sum >> std::cout >> std::endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:3: error: no match for 'operator<<' (operand types are 'int' and 'std::istream' {aka 'std::basic_istream<char>'})
7 | N << std::cin;
| ~ ^~ ~~~~~~~~
| | |
| int std::istream {aka std::basic_istream<char>}
a.cc:7:3: note: candidate: 'operator<<(i... |
s093175497 | p03795 | C++ | #include<iostream>
int main(void){
int N,t;
std::cin>>N;
t=N/15;
std::cout>>((800*N)-(500*t));
return 0;
} | a.cc: In function 'int main()':
a.cc:6:14: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
6 | std::cout>>((800*N)-(500*t));
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~
| | |
| | int
| ... |
s090309310 | p03795 | C++ | #include<iostream>
int main(void){
int N,t;
std::cin>>N;
t=N%15;
std::cout>>((800*N)-(500*t));
return 0;
} | a.cc: In function 'int main()':
a.cc:6:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
6 | std::cout>>((800*N)-(500*t));
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~
| | |
| | int
| std::ostream {aka ... |
s670683806 | p03795 | C++ | #include <bts/stdc++.h>
using namespace std;
int main()
{
int N;
cin >> N;
cout << (N * 800 - N / 15 * 200) << endl;
return 0;
} | a.cc:1:10: fatal error: bts/stdc++.h: No such file or directory
1 | #include <bts/stdc++.h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s129813127 | p03795 | C++ | #include <bts/stdc++.h>
using namespace std;
int main()
{
int N;
cin >> N;
cout << (N * 20 - N / 15) << endl;
return 0;
} | a.cc:1:10: fatal error: bts/stdc++.h: No such file or directory
1 | #include <bts/stdc++.h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s110483585 | p03795 | C++ | include <cstdio>
using namespace std;
int main(void){
int N=0;
int x,y=0;
scanf("%d",&N);
x=N*800;
y=N/15;
y*=200;
printf("%d\n",x-y);
return 0;
} | a.cc:1:1: error: 'include' does not name a type
1 | include <cstdio>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:6: error: 'scanf' was not declared in this scope
6 | scanf("%d",&N);
| ^~~~~
a.cc:10:6: error: 'printf' was not declared in this scope
10 | printf("%d\n",x-y);
... |
s461260503 | p03795 | 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... |
s015029145 | p03795 | Java | あ | Main.java:1: error: reached end of file while parsing
?
^
1 error
|
s831549847 | p03795 | 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:4:1: error: extended character is not valid in an identifier
4 |
| ^
a.cc:1:1: error: '\U000030bd\U000030fc\U000030b9\U000030b3\U000030fc\U000030c9' does not name a type
1 | ソースコード
| ^~~~~~~~~~~~
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/... |
s066422450 | p03795 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// get a integer
int N = sc.nextInt();
return N*800 - 200*(N/15);
}
} | Main.java:7: error: incompatible types: unexpected return value
return N*800 - 200*(N/15);
^
1 error
|
s932074946 | p03795 | Java | import java.util.Scanner;
/**
* Created by User on 2017/02/18.
*/
public class Main2 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
System.out.println(getPower(n));
}
public static long getPower(int n) {
i... | Main.java:6: error: class Main2 is public, should be declared in a file named Main2.java
public class Main2 {
^
1 error
|
s573567905 | p03795 | C++ | import java.util.*;
import java.io.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int price = n * 800;
price = price - 200*(n/15);
System.out.println(price);
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: ... |
s512777153 | p03795 | C++ | #include<stdio.h>
#include<math.h>
int main(){
long n, fact,i;
fact = 1;
scanf("%ld", &n);
for(i=1; i<=n; ++i) {
fact = fact * i;
};
printf("%d\n", fact%(pow(10,9) + 7));
return 0;
} | a.cc: In function 'int main()':
a.cc:13:22: error: invalid operands of types 'long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
13 | printf("%d\n", fact%(pow(10,9) + 7));
| ~~~~^~~~~~~~~~~~~~~~
| | |
| ... |
s385440025 | p03795 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// get a integer
int N = sc.nextInt();
return N*800 - 200*(N/15);
}
} | Main.java:7: error: incompatible types: unexpected return value
return N*800 - 200*(N/15);
^
1 error
|
s436368198 | p03795 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int x = N*800;
int y = N/15*200
System.out.println(x-y);
}
}
| Main.java:8: error: ';' expected
int y = N/15*200
^
1 error
|
s356785854 | p03795 | C | include <stdio.h>
int main (void){
int M,N,a,b,c,d;
scanf("%d %d",&M,&N);
a=2*M+N;
b=(a-a%4)/4;
if (N>=2*b) printf("%d\n",b);
if (N<2*b) {
c=(N-N%2)/2;
printf("%d\n",c);
}
return 0;
} | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s889237237 | p03795 | C++ | x = STDIN.gets
x = x.to_i
puts (x*800) - ((x/15)*200)
| a.cc:1:1: error: 'x' does not name a type
1 | x = STDIN.gets
| ^
|
s702487669 | p03795 | C++ | #include <iostream>
int main() {
int n;
cin >> n;
cout << (int)(n * 800 - (n / 15) * 200) << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | 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; ... |
s822387104 | p03795 | C++ | #include<stdio.h>
#include<math.h>
int main(){
int N;
scanf("%d", &n);
printf("%d\n", n*800 + 200*((n+1)%15));
return 0;
} | a.cc: In function 'int main()':
a.cc:6:16: error: 'n' was not declared in this scope
6 | scanf("%d", &n);
| ^
|
s269005526 | p03795 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
cin >> N;
cout << N*800 - ((N%15)*200);
return 0;
} | a.cc: In function 'int main()':
a.cc:10:12: error: 'N' was not declared in this scope
10 | cin >> N;
| ^
|
s861662627 | p03795 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
int main() {
int N;
cin >> N;
long long back = ceil(N/15) *200;
long long price = N*800 - back;
cout << price << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:26: error: 'ceil' was not declared in this scope
11 | long long back = ceil(N/15) *200;
| ^~~~
|
s947205648 | p03795 | C++ | #include <iostream>
using namespace std
int main() {
int a;
cin >> a;
cout << 800*a - a%15*200 << endl;
} | a.cc:2:20: error: expected ';' before 'int'
2 | using namespace std
| ^
| ;
3 |
4 | int main() {
| ~~~
|
s626301864 | p03795 | C++ | #include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
int N;
cin >> N;
cout << ((N * 800) - ((N / 15) * 200));
return 0;
} | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s494280784 | p03795 | C++ | Last login: Sat Feb 18 20:08:29 on ttys000
Xycas-MacBookPro:~ xyca$ ls
Desktop Downloads Movies Pictures terminal
Documents Library Music Public
Xycas-MacBookPro:~ xyca$ cd te
-bash: cd: te: No such file or directory
Xycas-MacBookPro:~ xyca$ cd terminal/
Xycas-MacBookPro:terminal xyca$ ls
Xycas-MacBookPro:terminal ... | a.cc:1:27: error: invalid digit "8" in octal constant
1 | Last login: Sat Feb 18 20:08:29 on ttys000
| ^~
a.cc:1:1: error: 'Last' does not name a type
1 | Last login: Sat Feb 18 20:08:29 on ttys000
| ^~~~
In file included from /usr/include/c++/14/iosfwd:42,
... |
s286738273 | p03795 | C++ | a = gets.to_i
x = a * 800
y = (a / 15) * 200
puts (x-y) | a.cc:1:1: error: 'a' does not name a type
1 | a = gets.to_i
| ^
|
s940194675 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll result[a] = {0};
ll factfastaf(ll n)
{
if (n >= 0)
{
result[0] = 1;
for (ll i = 1; i <= n; ++i)
{
result[i] = i * result[i - 1];
}
return result[n];
}
}
int main()
{
ll n;
ci... | a.cc:4:11: error: 'a' was not declared in this scope
4 | ll result[a] = {0};
| ^
a.cc: In function 'll factfastaf(ll)':
a.cc:9:9: error: 'result' was not declared in this scope
9 | result[0] = 1;
| ^~~~~~
|
s351005666 | p03796 | C++ | #include<stdio.h>
#include<iostream>
#include<algorithm>
#include<cstring>
using namespace std;
int main(){
long long int n;
cin>>n;
long long int pw=1;
long long int a=1000000000+7;
for(long long int i=1;i<=n;i++){
i =i%a;
pw *=i;
pw =pw%a
}
cout<< pw <<endl;
} | a.cc: In function 'int main()':
a.cc:15:15: error: expected ';' before '}' token
15 | pw =pw%a
| ^
| ;
16 | }
| ~
|
s461206298 | p03796 | C | #include <iostream>
#include<string>
#include<math.h>
#include<algorithm>
#include<vector>
using namespace std;
#define mod 1000000007
int main()
{
long long n,f=1; cin >> n;
for (int i = 1; i < n; ++i)
{
f =(f* i)%mod;
}
cout << (f*n)%mod;
}
| main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s232199343 | p03796 | C | #include<stdio.h>
int main(void){
int N;
long p=1;
scanf("%d",&N);
for(int i=1;i<N+1;i++){
p *= i;
}
p %= 1000000007;
printf("%ld\n",p);
return 0; | main.c: In function 'main':
main.c:13:3: error: expected declaration or statement at end of input
13 | return 0;
| ^~~~~~
|
s744960183 | p03796 | C++ | #include <algorithm>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0; i < n; i++)
#... | a.cc: In function 'int main()':
a.cc:29:15: error: expected ',' or ';' before ':' token
29 | ll ans = 1:
| ^
a.cc:30:9: error: 'i' was not declared in this scope
30 | REP(i, N){
| ^
a.cc:18:33: note: in definition of macro 'REP'
18 | #define REP(i, n) for(ll i = 1; i <... |
s435045616 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long int n,i=1,ans=1;
cin>>n;
for(i=1,i<=n;i++){
ans*=i;
ans%=10000000007;
}
cout<<ans<<endl | a.cc: In function 'int main()':
a.cc:7:19: error: expected ';' before ')' token
7 | for(i=1,i<=n;i++){
| ^
| ;
a.cc:11:18: error: expected ';' at end of input
11 | cout<<ans<<endl
| ^
| ;
a.cc:11:18: error: expected... |
s610178684 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define m 1e9+7
int main()
{
ll n;
cin>>n;
ll ans =1;
for(int i=1;i<=n;i++)
{
ans = (ans*i)%m;
}
cout<<ans;
} | a.cc: In function 'int main()':
a.cc:13:19: error: invalid operands of types 'll' {aka 'long long int'} and 'double' to binary 'operator%'
13 | ans = (ans*i)%m;
| ~~~~~~~^
| |
| ll {aka long long int}
|
s251321824 | p03796 | C++ | #include <iostream>
using namespace std;
int main(){
int n;
long long p = 1;
cin >> n;
for(int i = 1; i <= n; i++){
p *= i;
if(p >= 1000000007) p %= 1000000007;
cout << p << endl;
}
| a.cc: In function 'int main()':
a.cc:15:2: error: expected '}' at end of input
15 | }
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s026118161 | p03796 | C++ | #include <iostream>
using namespace std;
int main(){
int n;
long long p = 1;
cin >> n;
for(int i = 1; i <= n; i++){
p *= i;
if(p >= 1000000007) p %= 1000000007;
cout << p << endl;
}
| a.cc: In function 'int main()':
a.cc:15:2: error: expected '}' at end of input
15 | }
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s845842281 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N ;
int X=1;
for (int i = 0; i < N; i++) {
X=X*i%((1e9)+7);
}
cout << X << endl;
}
| a.cc: In function 'int main()':
a.cc:8:10: error: invalid operands of types 'int' and 'double' to binary 'operator%'
8 | X=X*i%((1e9)+7);
| ~~~^~~~~~~~~~
| | |
| int double
|
s432708189 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N ;
int X=1;
for (int i = 0; i < N; i++) {
X=X*i%((10**9)+7);
}
cout << X << endl;
}
| a.cc: In function 'int main()':
a.cc:8:16: error: invalid type argument of unary '*' (have 'int')
8 | X=X*i%((10**9)+7);
| ^~
|
s430941122 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N ;
int X=1;
for (int i = 0; i < N; i++) {
X*=i%((10**9)+7);
}
cout << X << endl;
}
| a.cc: In function 'int main()':
a.cc:8:15: error: invalid type argument of unary '*' (have 'int')
8 | X*=i%((10**9)+7);
| ^~
|
s481090979 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N ;
int X=1;
for (i = 0; i < N; i++) {
X*=i%((10**9)+7)
}
cout << X << endl;
} | a.cc: In function 'int main()':
a.cc:7:8: error: 'i' was not declared in this scope
7 | for (i = 0; i < N; i++) {
| ^
a.cc:8:15: error: invalid type argument of unary '*' (have 'int')
8 | X*=i%((10**9)+7)
| ^~
|
s361760757 | p03796 | C++ | #include <iostream>
using namespace std;
const int MOD = 1e9+7;
int main(){
int n ; cin >> n;
long long power = 1;
for(int i = 1; i <= n; ++i){
power *= i
power %= MOD;
}
cout << power << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:15: error: expected ';' before 'power'
9 | power *= i
| ^
| ;
10 | power %= MOD;
| ~~~~~
|
s774851295 | 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'
|
s724841496 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int ans = 1;
int show=pow(10,9)+7
for (int i=1;i<=N;i++) {
ans =(ans*i)%show;
}
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'for'
9 | for (int i=1;i<=N;i++) {
| ^~~
a.cc:9:16: error: 'i' was not declared in this scope
9 | for (int i=1;i<=N;i++) {
| ^
|
s676638187 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using LL = long long;
using P = pair<int,int>;
int main(){
int N, M;
cin >> N >> M;
rep(i,M){
int s, c;
if(s>N) ok = false;
:
}
| a.cc: In function 'int main()':
a.cc:14:25: error: 'ok' was not declared in this scope
14 | if(s>N) ok = false;
| ^~
a.cc:15:17: error: expected primary-expression before ':' token
15 | :
| ^
a.cc:17:2: error: expected '}' at end ... |
s418105767 | p03796 | C++ | #include <iostream>
#include <cstdint>
using namespace std;
int main() {
int n;
int64_t power=1;
cin >> n;
for(int i=1; i<n+1; i++) {
power *= i;
}
power /= 10**9+7
cout << power << endl;
} | a.cc: In function 'int main()':
a.cc:14:15: error: invalid type argument of unary '*' (have 'int')
14 | power /= 10**9+7
| ^~
|
s748677661 | p03796 | C++ | #include<iostream>
#include<cmath>
using namespace std;
int main() {
int i, N;
long long sum=1;
cin >> N;
for(i=1; i<=N; i++) {
sum *= N;
}
cout << sum%(pow(10,9)+7) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:15:14: error: invalid operands of types 'long long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
15 | cout << sum%(pow(10,9)+7) << endl;
| ~~~^~~~~~~~~~~~~~
| | |
| long long int ... |
s431454226 | p03796 | C++ | #include<bits/stdc++.h>
#include<cmath>
using namespace std;
int main() {
int i, N;
long long sum=1;
cin >> N;
for(i=1; i<=N; i++) {
sum *= N;
}
cout << sum%(pow(10,9)+7) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:15:14: error: invalid operands of types 'long long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
15 | cout << sum%(pow(10,9)+7) << endl;
| ~~~^~~~~~~~~~~~~~
| | |
| long long int ... |
s376966850 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
int i, N;
long long sum=1;
cin >> N;
for(i=1; i<=N; i++) {
sum *= N;
}
cout << sum%(pow(10,9)+7) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:14:14: error: invalid operands of types 'long long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
14 | cout << sum%(pow(10,9)+7) << endl;
| ~~~^~~~~~~~~~~~~~
| | |
| long long int ... |
s449841031 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
int i, N;
long long sum=1;
cin >> N;
for(i=1; i<=N; i++) {
sum *= N;
}
cout << sum << endl;
retutn 0;
} | a.cc: In function 'int main()':
a.cc:16:3: error: 'retutn' was not declared in this scope
16 | retutn 0;
| ^~~~~~
|
s314407664 | p03796 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
int i, N;
long long sum=1;
cin >> N;
for(i=1; i<=N; i++) {
sum *= N
}
cout << sum << endl;
retutn 0;
} | a.cc: In function 'int main()':
a.cc:11:13: error: expected ';' before '}' token
11 | sum *= N
| ^
| ;
12 | }
| ~
a.cc:16:3: error: 'retutn' was not declared in this scope
16 | retutn 0;
| ^~~~~~
|
s723382277 | p03796 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(void){
int n;
cin >> n;
long ans = 1;
for(int i = 1;i <= n;i++){
ans *= i;
}
cout << ans % (1e9l + 7) << endl;
}
| a.cc: In function 'int main()':
a.cc:11:16: error: invalid operands of types 'long int' and 'long double' to binary 'operator%'
11 | cout << ans % (1e9l + 7) << endl;
| ~~~ ^ ~~~~~~~~~~
| | |
| long int long double
|
s577068944 | 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
typedef long long ll; // long long型をこのように定義することで時間短縮
int main() {
cout << fixed << setprecision(10);
int n;
cin >> n;
ll ans = 1; // long long型にしてお... | a.cc:7:22: error: extended character is not valid in an identifier
7 | typedef long long ll; // long long型をこのように定義することで時間短縮
| ^
a.cc:7:22: error: '\U00003000' does not name a type
7 | typedef long long ll; // long long型をこのように定義することで時間短縮
| ^~
|
s853765617 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int N;
int main()
{
cin>>N;
int x = 1;
for (int i = 1; i <= N; i++)
{
ans *= i;
ans %= 1000000007;
}
cout << ans << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:13:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
13 | ans *= i;
| ^~~
| abs
a.cc:17:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
17 | cout << ans << endl;
| ^~~
| ... |
s107259011 | p03796 | C++ | #define cout(x) cout<<(x)<<endl
#define all(v) v.begin(), v.end()
using namespace std;
//型エイリアス
using vi = vector<int>;
using ll = long long;
using P = pair<int,int>;
using Mat = vector<vector<int>>;
const ll inf = 1e18;
const int N = 2e5+10;
int main(){
int n;
cin >> n;
ll factorial=1;
ll thr = 1e9;... | a.cc:5:12: error: 'vector' does not name a type
5 | using vi = vector<int>;
| ^~~~~~
a.cc:7:11: error: 'pair' does not name a type
7 | using P = pair<int,int>;
| ^~~~
a.cc:8:13: error: 'vector' does not name a type
8 | using Mat = vector<vector<int>>;
| ^~~... |
s969243358 | p03796 | C++ | #define cout(x) cout<<(x)<<endl
#define all(v) v.begin(), v.end()
using namespace std;
//型エイリアス
using vi = vector<int>;
using ll = long long;
using P = pair<int,int>;
using Mat = vector<vector<int>>;
const ll inf = 1e18;
const int N = 2e5+10;
int main(){
int n;
cin >> n;
ll factorial=1;
ll thr = 1e9;... | a.cc:5:12: error: 'vector' does not name a type
5 | using vi = vector<int>;
| ^~~~~~
a.cc:7:11: error: 'pair' does not name a type
7 | using P = pair<int,int>;
| ^~~~
a.cc:8:13: error: 'vector' does not name a type
8 | using Mat = vector<vector<int>>;
| ^~~... |
s568957060 | p03796 | C++ | #define cout(x) cout<<(x)<<endl
#define all(v) v.begin(), v.end()
using namespace std;
//型エイリアス
using vi = vector<int>;
using ll = long long;
using P = pair<int,int>;
using Mat = vector<vector<int>>;
const ll inf = 1e18;
const int N = 2e5+10;
int main(){
int n;
cin >> n;
ll factorial=1;
for(int i=1;i... | a.cc:5:12: error: 'vector' does not name a type
5 | using vi = vector<int>;
| ^~~~~~
a.cc:7:11: error: 'pair' does not name a type
7 | using P = pair<int,int>;
| ^~~~
a.cc:8:13: error: 'vector' does not name a type
8 | using Mat = vector<vector<int>>;
| ^~~... |
s775445284 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
long long s=1;
cin >> N;
for (int i = 1; i <= N; i++) {
s *= i;
}
cout << s %= 1000000007;;
}
| a.cc: In function 'int main()':
a.cc:15:12: error: no match for 'operator%=' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'int')
15 | cout << s %= 1000000007;;
| ~~~~~~~~~~^~~~~~~~~~~~~
|
s620295131 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
long long s=1;
cin >> N;
for (int i = 1; i <= N; i++) {
s *= i;
}
cout << s%=1000000007;
}
| a.cc: In function 'int main()':
a.cc:15:14: error: no match for 'operator%=' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'int')
15 | cout << s%=1000000007;
| ~~~~~~~~~~~~^~~~~~~~~~~~
|
s486551150 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
long long s=1;
cin >> N;
for (int i = 1; i <= N; i++) {
s *= i;
}
cout << s%=1000000007;;
}
| a.cc: In function 'int main()':
a.cc:15:14: error: no match for 'operator%=' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'int')
15 | cout << s%=1000000007;;
| ~~~~~~~~~~~~^~~~~~~~~~~~
|
s410156232 | p03796 | 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;
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:8:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
8 | ans=1;
| ^~~
| abs
|
s625688348 | p03796 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
int N;
cin >> N;
long int power = 1;
int a = 1000000007;
for (int i=1; i <= N; i++) {
power = power * i % 1
}
cout << power << endl;
} | a.cc: In function 'int main()':
a.cc:11:30: error: expected ';' before '}' token
11 | power = power * i % 1
| ^
| ;
12 | }
| ~
|
s944013026 | p03796 | C++ | #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int x
for (int i=1; i <= N; i++) {
x = i * x % 109 + 7;
}
cout << x << endl;
}
| a.cc: In function 'int main()':
a.cc:9:5: error: expected initializer before 'for'
9 | for (int i=1; i <= N; i++) {
| ^~~
a.cc:9:19: error: 'i' was not declared in this scope
9 | for (int i=1; i <= N; i++) {
| ^
a.cc:12:13: error: 'x' was not declared in this scope
1... |
s622192387 | p03796 | C++ | #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int j = 1;
for (int i=1; i <= N; i++) {
if (N==1) cout << 1 << endl; break;
int total = i * j + j;
j = total;
}
cout << total << endl;
}
| a.cc: In function 'int main()':
a.cc:15:13: error: 'total' was not declared in this scope
15 | cout << total << endl;
| ^~~~~
|
s289064478 | p03796 | C++ | #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int j = 1;
for (i=1; i <= N; i++) {
if (N==1) cout << 1 << endl; break;
int total = i * j + j;
if (i == N) cout << total << endl;
j = total;
}
} | a.cc: In function 'int main()':
a.cc:9:10: error: 'i' was not declared in this scope
9 | for (i=1; i <= N; i++) {
| ^
|
s146374333 | p03796 | C++ | #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
j = 1;
for (i=1; i <= N; i++) {
if (N==1) cout << 1 << endl; break;
int total = i * j + j;
if (i == N) cout << total << endl;
int j = total;
}
}
| a.cc: In function 'int main()':
a.cc:8:5: error: 'j' was not declared in this scope
8 | j = 1;
| ^
a.cc:9:10: error: 'i' was not declared in this scope
9 | for (i=1; i <= N; i++) {
| ^
|
s414942698 | p03796 | C++ | #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
j = 1;
for (i=1; i <= N; i++) {
if (N==1) cout << 1 << endl;
int total = i * j + j;
if (i == N) cout << total << endl;
int j = total;
}
}
| a.cc: In function 'int main()':
a.cc:8:5: error: 'j' was not declared in this scope
8 | j = 1;
| ^
a.cc:9:10: error: 'i' was not declared in this scope
9 | for (i=1; i <= N; i++) {
| ^
|
s855109550 | p03796 | C++ | #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
j = 1
for (i=1; i <= N; i++) {
if (N==1) cout << 1 << endl;
int total = i * j + j;
if (i == N) cout << total << endl;
int j = total;
}
}
| a.cc: In function 'int main()':
a.cc:8:5: error: 'j' was not declared in this scope
8 | j = 1
| ^
a.cc:9:15: error: 'i' was not declared in this scope
9 | for (i=1; i <= N; i++) {
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.