submission_id
stringlengths 10
10
| problem_id
stringlengths 6
6
| language
stringclasses 3
values | code
stringlengths 1
522k
| compiler_output
stringlengths 43
10.2k
|
|---|---|---|---|---|
s326543192
|
p00007
|
Java
|
import java.util.*;
public class Math{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
double money = 10;
for(int i=0;i<n;i++)
money*=1.05;
System.out.println(Math.ceil(money)*10000);
}
}
|
Main.java:2: error: class Math is public, should be declared in a file named Math.java
public class Math{
^
Main.java:9: error: cannot find symbol
System.out.println(Math.ceil(money)*10000);
^
symbol: method ceil(double)
location: class Math
2 errors
|
s748184314
|
p00007
|
Java
|
mport java.util.Scanner;
/**
* Created by Reopard on 2014/05/06.
*/
public class Main {
public static void main(String args[]){
int debt = 100000;
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
for(int i = 0; i < n; i++){
debt += debt*0.05;
if(debt % 1000 > 0){
debt -= debt % 1000;
debt += 1000;
}
}
System.out.println(debt);
}
}
|
Main.java:1: error: class, interface, enum, or record expected
mport java.util.Scanner;
^
1 error
|
s252738416
|
p00007
|
Java
|
import java.util.Scanner;
/**
* Created by Reopard on 2014/05/06.
*/
public class DebtHell {
public static void main(String args[]){
int debt = 100000;
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
for(int i = 0; i < n; i++){
debt += debt*0.05;
if(debt % 1000 > 0){
debt -= debt % 1000;
debt += 1000;
}
}
System.out.println(debt);
}
}
|
Main.java:6: error: class DebtHell is public, should be declared in a file named DebtHell.java
public class DebtHell {
^
1 error
|
s575445891
|
p00007
|
Java
|
#include <iostream>
#include <math.h>
using namespace std;
int calcDebt(int debt){
double tmp = debt * 1.05;
int result = (int) ceil(tmp);
if(result % 1000 == 0){
return result;
}else{
return (result / 1000 + 1) * 1000;
}
}
int main(int argc, char *argv[]) {
int result = 100000;
int n;
scanf("%d", &n);
for(int i=0; i<n; i++){
result = calcDebt(result);
}
printf("%d", result);
}
|
Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:2: error: illegal character: '#'
#include <math.h>
^
Main.java:6: error: unnamed classes are a preview feature and are disabled by default.
int calcDebt(int debt){
^
(use --enable-preview to enable unnamed classes)
Main.java:16: error: <identifier> expected
int main(int argc, char *argv[]) {
^
Main.java:19: error: illegal start of expression
scanf("%d", &n);
^
5 errors
|
s904121478
|
p00007
|
Java
|
import java.util.Scanner;
import java.math.BigDecimal;
public class Main{
private int first;
DebtHell(int yen){
first = yen;
}
int calculate(int yen){
BigDecimal bd = new BigDecimal(yen*1.05);
BigDecimal bd1 = bd.setScale(-4, BigDecimal.ROUND_HALF_UP);
return bd1.intValue();
}
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
DebtHell Deb = new DebtHell(100000);
int n = scan.nextInt();
int yen = 100000;
for(int i=0;i<n-2;i++){
yen =Deb.calculate(yen);
}
System.out.println(yen);
scan.close();
}
}
|
Main.java:5: error: invalid method declaration; return type required
DebtHell(int yen){
^
1 error
|
s114870097
|
p00007
|
Java
|
import java.util.Scanner;
import java.math.BigDecimal;
public class Main{
private int first;
Main(int yen){
first = yen;
}
int calculate(int yen){
BigDecimal bd = new BigDecimal(yen*1.05);
BigDecimal bd1 = bd.setScale(-4, BigDecimal.ROUND_HALF_UP);
return bd1.intValue();
}
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
Main Deb = new Main(100000);
int n = scan.nextInt();
int yen = 100000;
for(int i=0;i<n-2;i++){
yen =Deb.calculate(yen);
}
System.out.println(yen);
scan.close();
}
}
|
Main.java:15: error: illegal character: '\u3000'
????Main Deb = new Main(100000);
^
Main.java:15: error: illegal character: '\u3000'
????Main Deb = new Main(100000);
^
Main.java:15: error: illegal character: '\u3000'
????Main Deb = new Main(100000);
^
Main.java:15: error: illegal character: '\u3000'
????Main Deb = new Main(100000);
^
4 errors
|
s010234146
|
p00007
|
C
|
#include<stdio.h>
int main(void){
int r=100000;
int n,a;
scanf("%d",&n);
for(int i = 0; i<n; i++){
r = r*1.05;
if(r%1000 > 0){
a=r%1000
r=r+1000-a;
}
}
printf("%d\n",r);
return 0;
}
|
main.c: In function 'main':
main.c:15:9: error: expected ';' before 'r'
15 | a=r%1000
| ^
| ;
16 | r=r+1000-a;
| ~
|
s142594939
|
p00007
|
C
|
#include <stdio.h>
int main(void)
{
int i,j,n,k=1;
i=100000;
scanf("%d",&n);
if(n==0){
printf("%d\n",i);
return 0;}
do{
j=i*0.05;
i+=j;
if(i%1000!=0)i=i+1000-(i%1000);
k++;
}while(k<=n);
printf("%d\n",i);
return
|
main.c: In function 'main':
main.c:21:1: error: expected expression at end of input
21 | return
| ^~~~~~
main.c:21:1: error: expected declaration or statement at end of input
|
s151245936
|
p00007
|
C
|
#include<stdio.h>
int roundup(double x);
int main(void){
double debt;
int debt2;
double rishi;
int n; //年数入力用変数
int i; //ループ用変数
debt = 100000;
rishi = 1.05;
scanf("%d", &n);
for (i = 0; i < n; i++){
debt = debt*rishi;
}
debt2 = roundup(debt / 10000);
debt2 *= 10000;
printf("%d\n", debt2);
return 0;
}
int roundup(double x){
int y;
x += 0.9;
y = (int)x;
return y
}
|
main.c: In function 'roundup':
main.c:32:17: error: expected ';' before '}' token
32 | return y
| ^
| ;
33 | }
| ~
|
s208445491
|
p00007
|
C
|
#include <stdio.h>
#include <math.h>
int main(void){
int n = 0;
double debt = 100; /*100 thousand yen*/
int i = 0;
scanf("%d", &n);
for (i = 0; i < n; i++){
debt = ceil(debt * 1.05);
}
printf("%d", (int) (debt * 1000);
return 0;
}
|
main.c: In function 'main':
main.c:14:41: error: expected ')' before ';' token
14 | printf("%d", (int) (debt * 1000);
| ~ ^
| )
main.c:16:18: error: expected ';' before '}' token
16 | return 0;
| ^
| ;
17 | }
| ~
|
s153513572
|
p00007
|
C
|
#include<stdio.h>
#include<math.h>
int main(){
int a = 100000;
int b = 0;
float c = 0.05;
int n = 0;
scanf("%d",&n);
if (n > 100)
{
n = 100;
}
b = a * c;
for (int i = 0; i < n; i++)
{
a += b;
}
a = int(a / 100) * 100;
printf("%d\n",a);
return 0;
}
|
main.c: In function 'main':
main.c:15:9: error: stray '\343' in program
15 | <U+3000><U+3000><U+3000><U+3000>n = 100;
| ^~~~~~~~
main.c:15:11: error: stray '\343' in program
15 | <U+3000><U+3000><U+3000><U+3000>n = 100;
| ^~~~~~~~
main.c:15:13: error: stray '\343' in program
15 | <U+3000><U+3000><U+3000><U+3000>n = 100;
| ^~~~~~~~
main.c:15:15: error: stray '\343' in program
15 | <U+3000><U+3000><U+3000><U+3000>n = 100;
| ^~~~~~~~
main.c:26:13: error: expected expression before 'int'
26 | a = int(a / 100) * 100;
| ^~~
|
s109350159
|
p00007
|
C
|
#include<stdio.h>
#include<math.h>
int main(){
int a = 100000;
int b = 0;
float c = 0.05f;
int n = 0;
scanf("%d",&n);
if (n > 100)
{
n = 100;
}
b = a * c;
for (int i = 0; i < n; i++)
{
a += b;
}
a = int(a / 100) * 100;
printf("%d\n",a);
return 0;
}
|
main.c: In function 'main':
main.c:15:9: error: stray '\343' in program
15 | <U+3000><U+3000><U+3000><U+3000>n = 100;
| ^~~~~~~~
main.c:15:11: error: stray '\343' in program
15 | <U+3000><U+3000><U+3000><U+3000>n = 100;
| ^~~~~~~~
main.c:15:13: error: stray '\343' in program
15 | <U+3000><U+3000><U+3000><U+3000>n = 100;
| ^~~~~~~~
main.c:15:15: error: stray '\343' in program
15 | <U+3000><U+3000><U+3000><U+3000>n = 100;
| ^~~~~~~~
main.c:26:13: error: expected expression before 'int'
26 | a = int(a / 100) * 100;
| ^~~
|
s180852052
|
p00007
|
C
|
include<stdio.h>
int main(void)
{
int n;
int debt = 100000;
scanf("%d",&n);
while ( n-- > 0 ) {
debt *= 1.05;
if ( debt % 1000 ) {
debt /= 1000;
debt += 1;
debt *= 1000;
}
}
printf("%d\n", debt);
return 0;
}
|
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s652274019
|
p00007
|
C
|
#include <stdio.h>
int main(void){
int n;
long debt;
scanf("%d", &n);
debt=100000;
for(i=1; i<=n; i++){
debt=debt+debt/20;
if(debt%1000!=0){
debt=debt+(1000-debt%1000);
}
i++;
}
return 0;
}
|
main.c: In function 'main':
main.c:12:5: error: 'i' undeclared (first use in this function)
12 | for(i=1; i<=n; i++){
| ^
main.c:12:5: note: each undeclared identifier is reported only once for each function it appears in
|
s337181356
|
p00007
|
C
|
include <stdio.h>
int main(void){
int n, i, debt;
debt=100000;
scanf("%d", &n);
for(i=0; i<n; i++){
debt=debt+(debt/20);
if(debt%1000!=0)
debt=debt+(1000-(debt%1000));
}
printf("%d", debt);
return 0;
}
|
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s993266357
|
p00007
|
C
|
#include<stdio.h>
int main(){
int i,j;
int n;
int debt;
scanf("%d",&n);
for(i=0;i<=n;i++){
if(i==0) debt=100000;
else{
debt+=debt*0.05;
if(debt%1000!=0){
debt/=1000;
debt*=1000;
debt+=1000;
}
}
printf("%d\n",debt);
return 0;
}
|
main.c: In function 'main':
main.c:24:1: error: expected declaration or statement at end of input
24 | }
| ^
|
s301397078
|
p00007
|
C
|
#include<stdio.h>
int main(){
int i,j;
int n;
int debt;
scanf("%d",&n);
for(i=0;i<=n;i++){
if(i==0){
debt=100000;
}else{
debt+=debt*0.05;
if(debt%1000!=0){
debt/=1000;
debt*=1000;
debt+=1000;
}
}
printf("%d\n",debt);
return 0;
}
|
main.c: In function 'main':
main.c:25:1: error: expected declaration or statement at end of input
25 | }
| ^
|
s959996736
|
p00007
|
C
|
#include<stdio.h>
int main(void) {
int i,n, j;
double debt = 100000;
scanf_s("%d",&n);
for (i = 0; i < n; i++) {
debt = debt*1.05;
j = debt;
j = j / 1000 + 1;
debt = j * 1000;
}
printf("%lf\n", debt);
return 0;
}
|
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
6 | scanf_s("%d",&n);
| ^~~~~~~
| scanf
|
s556452116
|
p00007
|
C
|
#include<stdio.h>
int main(void) {
int i,n,j,k;
double debt = 100000;
scanf("%d",&n);
for (i = 0; i < n; i++) {
debt = debt*1.05;
j = debt;
j = j / 1000 + 1;
debt = j * 1000;
}
k=debt
printf("%d\n", k);
return 0;
}
|
main.c: In function 'main':
main.c:13:15: error: expected ';' before 'printf'
13 | k=debt
| ^
| ;
14 | printf("%d\n", k);
| ~~~~~~
|
s894800692
|
p00007
|
C
|
#include<stdio.h>
int main(void){
int i,j;
double debt;
scanf("%d",i);
for(i=0,i<n;i++){
debt = debt*1.05;
j = debt;
if((debt-j)==0.000){
j = j/1000 ;
debt = j*1000;
}
else{
j = j/1000 +1;
debt = j*1000;
}
}
return 0;
}
|
main.c: In function 'main':
main.c:7:19: error: 'n' undeclared (first use in this function)
7 | for(i=0,i<n;i++){
| ^
main.c:7:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:24: error: expected ';' before ')' token
7 | for(i=0,i<n;i++){
| ^
| ;
|
s992475724
|
p00007
|
C
|
#include<stdio.h>
int main(void){
int i,n;
int x = 100000;
scanf("%d"&n);
for(i=0;i<n;i++){
x=x*1.05;
if(x%1000!=0){
x=(x/1000+1)*1000;
}
}
printf("%d\n",%x);
return 0;
}
|
main.c: In function 'main':
main.c:6:19: error: invalid operands to binary & (have 'char *' and 'int')
6 | scanf("%d"&n);
| ~~~~^
| |
| char *
main.c:14:23: error: expected expression before '%' token
14 | printf("%d\n",%x);
| ^
|
s828415066
|
p00007
|
C
|
#include<stdio.h>
int main(void){
int i,n;
int x = 100000;
scanf("%d"&n);
for(i=0;i<n;i++){
x=x*1.05;
if(x%1000!=0){
x=(x/1000+1)*1000;
}
}
printf("%d\n",x);
return 0;
}
|
main.c: In function 'main':
main.c:6:19: error: invalid operands to binary & (have 'char *' and 'int')
6 | scanf("%d"&n);
| ~~~~^
| |
| char *
|
s718083088
|
p00007
|
C
|
#include <stdio.h>
int main(void)
{
int n;
int sum;
scanf("%d", &n);
sum = 100000;
while (n--){
sum += (sum / 100 * 5);
}
if (sum % 10000 > 0){
sum /= 10000;
sum *= 10000;
sum += 10000;
}
printf("%d\n", sum);
return (0);
|
main.c: In function 'main':
main.c:24:9: error: expected declaration or statement at end of input
24 | return (0);
| ^~~~~~
|
s159645476
|
p00007
|
C
|
#include <stdio.h>
int main(void){
int loan=100000;
double temp=0;
int i=0;
int week;
int check=0;
scanf("%d", &week);
while(week > 0){
temp=loan*1.05;
loan=temp;
check = temp % 1000;
if(check!=0){
temp/=1000;
temp*=1000;
temp+=1000;
loan=temp;
week--;
continue;
}
check = temp % 100;
if(check!=0){
temp/=100;
temp*=100;
temp+=100;
loan=temp;
week--;
continue;
}
check = temp % 10;
if(check!=0){
temp/=10;
temp*=10;
temp+=10;
loan=temp;
week--;
continue;
}
if( (temp-loan) != 0){
loan+=1;
}
week--;
}
return 0;
}
|
main.c: In function 'main':
main.c:18:20: error: invalid operands to binary % (have 'double' and 'int')
18 | check = temp % 1000;
| ^
main.c:28:20: error: invalid operands to binary % (have 'double' and 'int')
28 | check = temp % 100;
| ^
main.c:38:20: error: invalid operands to binary % (have 'double' and 'int')
38 | check = temp % 10;
| ^
|
s410767261
|
p00007
|
C
|
#include <stdio.h>
int main(void){
int loan=100000;
double temp=0.0;
int week;
int check=0;
scanf("%d", &week);
while(week > 0){
temp=loan*1.05;
loan=(int)temp;
check = temp % 1000;
if(check!=0){
temp/=1000;
temp*=1000;
temp+=1000;
loan=temp;
week--;
continue;
}
check = temp % 100;
if(check!=0){
temp/=100;
temp*=100;
temp+=100;
loan=temp;
week--;
continue;
}
check = temp % 10;
if(check!=0){
temp/=10;
temp*=10;
temp+=10;
loan=temp;
week--;
continue;
}
if( (temp-loan) != 0){
loan+=1;
}
week--;
}
printf("%d\n",loan);
return 0;
}
|
main.c: In function 'main':
main.c:17:20: error: invalid operands to binary % (have 'double' and 'int')
17 | check = temp % 1000;
| ^
main.c:27:20: error: invalid operands to binary % (have 'double' and 'int')
27 | check = temp % 100;
| ^
main.c:37:20: error: invalid operands to binary % (have 'double' and 'int')
37 | check = temp % 10;
| ^
|
s980769970
|
p00007
|
C
|
#include <stdio.h>
int main(void){
int loan=100000;
double temp=0.0;
int week;
int check=0;
scanf("%d", &week);
while(week > 0){
temp=loan*1.05;
loan=(int)temp;
check = temp % 1000.0;
if(check!=0){
temp/=1000;
temp*=1000;
temp+=1000;
loan=temp;
week--;
continue;
}
check = temp % 100.0;
if(check!=0){
temp/=100;
temp*=100;
temp+=100;
loan=temp;
week--;
continue;
}
check = temp % 10.0;
if(check!=0){
temp/=10;
temp*=10;
temp+=10;
loan=temp;
week--;
continue;
}
if( (temp-loan) != 0){
loan+=1;
}
week--;
}
printf("%d\n",loan);
return 0;
}
|
main.c: In function 'main':
main.c:17:20: error: invalid operands to binary % (have 'double' and 'double')
17 | check = temp % 1000.0;
| ^
main.c:27:20: error: invalid operands to binary % (have 'double' and 'double')
27 | check = temp % 100.0;
| ^
main.c:37:20: error: invalid operands to binary % (have 'double' and 'double')
37 | check = temp % 10.0;
| ^
|
s030506973
|
p00007
|
C
|
#include <stdio.h>
int main(void){
int loan=100000;
double temp=0.0;
int week;
int check=0;
scanf("%d", &week);
while(week > 0){
temp=loan*1.05;
loan=(int)temp;
check = loan % 1000;
if(check!=0){
loan/=1000;
loan*=1000;
loan+=1000;
week--;
continue;
}
check = loan % 100.0;
if(check!=0){
loan/=100;
loan*=100;
loan+=100;
week--;
continue;
}
check = loan % 10.0;
if(check!=0){
loan/=10;
loan*=10;
loan+=10;
week--;
continue;
}
if( (temp-loan) != 0){
loan+=1;
}
week--;
}
printf("%d\n",loan);
return 0;
}
|
main.c: In function 'main':
main.c:26:20: error: invalid operands to binary % (have 'int' and 'double')
26 | check = loan % 100.0;
| ^
main.c:35:20: error: invalid operands to binary % (have 'int' and 'double')
35 | check = loan % 10.0;
| ^
|
s466667079
|
p00007
|
C
|
#include<stdio.h>
#include<stdlib.h>
#define RISI 1.05
int main(void)
{
unsigned double debt = 100000;
int i = 0;
int n = 0;
unsigned double kiriage = 0;
int ans=0;
scanf("%d",&n);
for(i = 0; i < n; i++)
{
debt = debt * RISI;
printf("%lf\n",debt);
}
kiriage = (int)debt / 10000;
kiriage = kiriage*10000;
ans = kiriage+10000;
printf("%d\n",ans);
return 0;
}
|
main.c: In function 'main':
main.c:9:18: error: both 'unsigned' and 'double' in declaration specifiers
9 | unsigned double debt = 100000;
| ^~~~~~
main.c:12:18: error: both 'unsigned' and 'double' in declaration specifiers
12 | unsigned double kiriage = 0;
| ^~~~~~
|
s480867209
|
p00007
|
C
|
#include <stdio.h>
int debt_amount(int, int);
int main(){
int n;
scanf("%d", &n);
printf("%d\n", debt_amout(100000, n));
return 0;
}
int debt_amount(int a, int x){
if(x >= 1){
a = a * 1.05;
if(a%1000 != 0){
a = (a/1000 + 1)*1000;
}
}
}
|
main.c: In function 'main':
main.c:8:24: error: implicit declaration of function 'debt_amout'; did you mean 'debt_amount'? [-Wimplicit-function-declaration]
8 | printf("%d\n", debt_amout(100000, n));
| ^~~~~~~~~~
| debt_amount
|
s396498996
|
p00007
|
C
|
#include<stdio.h>
int main(void){
int money,n,k,num;
money = 100000;
scanf("%d",&n);
for( i=0;i<n;i++ ){
money *= 1.05;
num = money /100;
k = money % 100;
if( k > 0 ){
money = (num * 100) + 1000;
}
}
printf("%d\n",money);
return 0;
}
|
main.c: In function 'main':
main.c:10:14: error: 'i' undeclared (first use in this function)
10 | for( i=0;i<n;i++ ){
| ^
main.c:10:14: note: each undeclared identifier is reported only once for each function it appears in
|
s363720190
|
p00007
|
C
|
#include <stdio.h>
int main()
{
int n, i;
double ans = 100000;
scanf("%d", &n);
for(i=0; i<n; i++)
ans = int((ans * 1.05 /1000) * 1000);
printf("%d\n", ans);
return 0;
}
|
main.c: In function 'main':
main.c:11:11: error: expected expression before 'int'
11 | ans = int((ans * 1.05 /1000) * 1000);
| ^~~
|
s094445787
|
p00007
|
C
|
#include <stdio.h>
#include <math.h>
int main(void)
{
int n;
double y;
???scanf(%f,&n);
printf(pow(100000??? y));
}
return 0;
}
|
main.c: In function 'main':
main.c:8:1: error: expected expression before '?' token
8 | ???scanf(%f,&n);
| ^
main.c:8:16: error: expected ':' before ';' token
8 | ???scanf(%f,&n);
| ^
| :
main.c:10:20: error: expected expression before '?' token
10 | printf(pow(100000??? y));
| ^
main.c:10:9: error: too few arguments to function 'pow'
10 | printf(pow(100000??? y));
| ^~~
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdio.h:28,
from main.c:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note: declared here
173 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
| ^~~~~~~~~~~~~~
main.c: At top level:
main.c:13:3: error: expected identifier or '(' before 'return'
13 | return 0;
| ^~~~~~
main.c:14:1: error: expected identifier or '(' before '}' token
14 | }
| ^
|
s234900138
|
p00007
|
C
|
#include <stdio.h>
#include <math.h>
int main(void)
{
int n;
double y;
scanf(%f,&n);
printf(pow(100000??? y));
}
return 0;
}
|
main.c: In function 'main':
main.c:8:9: error: expected expression before '%' token
8 | scanf(%f,&n);
| ^
main.c:9:19: error: expected expression before '?' token
9 | printf(pow(100000??? y));
| ^
main.c:9:8: error: too few arguments to function 'pow'
9 | printf(pow(100000??? y));
| ^~~
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdio.h:28,
from main.c:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note: declared here
173 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
| ^~~~~~~~~~~~~~
main.c: At top level:
main.c:12:3: error: expected identifier or '(' before 'return'
12 | return 0;
| ^~~~~~
main.c:13:1: error: expected identifier or '(' before '}' token
13 | }
| ^
|
s813344191
|
p00007
|
C
|
#include <stdio.h>
#include <math.h>
int main(void)
{
int n;
double y;
scanf("%f",&n);
printf(pow(100000??? y));
}
return 0;
}
|
main.c: In function 'main':
main.c:9:19: error: expected expression before '?' token
9 | printf(pow(100000??? y));
| ^
main.c:9:8: error: too few arguments to function 'pow'
9 | printf(pow(100000??? y));
| ^~~
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdio.h:28,
from main.c:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note: declared here
173 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
| ^~~~~~~~~~~~~~
main.c: At top level:
main.c:12:3: error: expected identifier or '(' before 'return'
12 | return 0;
| ^~~~~~
main.c:13:1: error: expected identifier or '(' before '}' token
13 | }
| ^
|
s094179333
|
p00007
|
C
|
#include <stdio.h>
#include <math.h>
int main(void)
{
int n;
double y;
scanf("%f",&n);
printf(pow(100000,y));
}
return 0;
}
|
main.c: In function 'main':
main.c:9:8: error: incompatible type for argument 1 of 'printf'
9 | printf(pow(100000,y));
| ^~~~~~~~~~~~~
| |
| double
In file included from main.c:1:
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'double'
363 | extern int printf (const char *__restrict __format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c: At top level:
main.c:12:3: error: expected identifier or '(' before 'return'
12 | return 0;
| ^~~~~~
main.c:13:1: error: expected identifier or '(' before '}' token
13 | }
| ^
|
s537506410
|
p00007
|
C
|
#include <stdio.h>
#include <math.h>
int main(void)
{
int n;
double y;
scanf("%f",&n);
printf(pow(100000,y));
}
return 0;
}
|
main.c: In function 'main':
main.c:9:10: error: incompatible type for argument 1 of 'printf'
9 | printf(pow(100000,y));
| ^~~~~~~~~~~~~
| |
| double
In file included from main.c:1:
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'double'
363 | extern int printf (const char *__restrict __format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c: At top level:
main.c:12:3: error: expected identifier or '(' before 'return'
12 | return 0;
| ^~~~~~
main.c:13:1: error: expected identifier or '(' before '}' token
13 | }
| ^
|
s338544199
|
p00007
|
C
|
#include <stdio.h>
#include <math.h>
int main(void)
{
int n;
double y;
scanf("%f",&n);
printf("%f",pow(100000,y));
}
return 0;
}
|
main.c:12:3: error: expected identifier or '(' before 'return'
12 | return 0;
| ^~~~~~
main.c:13:1: error: expected identifier or '(' before '}' token
13 | }
| ^
|
s062778452
|
p00007
|
C
|
#include <stdio.h>
#include <math.h>
int main(void)
{
int n,i;
double x;
double y;
scanf("%f",&n);
//x=ceil(100*pow(1.05,y));
if(n=1){ x=100*1.05{
else{
x=100*1.05
for(i=1;1<=n;i++){
x=ceil(x*1.05));
}
}
x=x*1000;
printf("%f",x);
return 0;
}
|
main.c: In function 'main':
main.c:12:22: error: expected ';' before '{' token
12 | if(n=1){ x=100*1.05{
| ^
| ;
main.c:27:1: error: expected declaration or statement at end of input
27 | }
| ^
|
s204586911
|
p00007
|
C
|
#include <stdio.h>
#include <math.h>
int main(void)
{
int n,i;
double x;
double y;
scanf("%f",&n);
//x=ceil(100*pow(1.05,y));
if(n=1){ x=100*1.05}
else{
x=100*1.05
for(i=1;1<=n;i++){
x=ceil(x*1.05));
}
x=x*1000;
printf("%f",x);
return 0;
}
|
main.c: In function 'main':
main.c:12:22: error: expected ';' before '}' token
12 | if(n=1){ x=100*1.05}
| ^
| ;
main.c:14:15: error: expected ';' before 'for'
14 | x=100*1.05
| ^
| ;
15 | for(i=1;1<=n;i++){
| ~~~
|
s079136200
|
p00007
|
C
|
#include <stdio.h>
#include <math.h>
int main(void)
{
int n,i;
double x;
double y;
scanf("%f",&n);
//x=ceil(100*pow(1.05,y));
if(n=1){ x=100*1.05;}
else{
x=100*1.05;
for(i=1;1<=n;i++){
x=ceil(x*1.05));
}
x=x*1000;
printf("%f",x);
return 0;
}
|
main.c: In function 'main':
main.c:16:21: error: expected ';' before ')' token
16 | x=ceil(x*1.05));
| ^
| ;
main.c:16:21: error: expected statement before ')' token
main.c:26:1: error: expected declaration or statement at end of input
26 | }
| ^
|
s346408829
|
p00007
|
C
|
#include <stdio.h>
#include <math.h>
int main(void)
{
int n,i;
double x;
double y;
scanf("%f",&n);
//x=ceil(100*pow(1.05,y));
if(n=1){ x=100*1.05;}
else{
x=100*1.05;
for(i=1;1<=n;i++){
x=ceil(x*1.05));
}
x=x*1000;
printf("%f",x);
return 0;
}
|
main.c: In function 'main':
main.c:16:21: error: expected ';' before ')' token
16 | x=ceil(x*1.05));
| ^
| ;
main.c:16:21: error: expected statement before ')' token
main.c:26:1: error: expected declaration or statement at end of input
26 | }
| ^
|
s634020613
|
p00007
|
C
|
#include <stdio.h>
#include <math.h>
int main(void)
{
int n,i;
double x;
double y;
scanf("%f",&n);
//x=ceil(100*pow(1.05,y));
if(n=1){ x=100*1.05;}
else{
x=100*1.05;
for(i=1;1<=n;i++){
x=ceil(x*1.05);
}
x=x*1000;
printf("%f",x);
return 0;
}
|
main.c: In function 'main':
main.c:26:1: error: expected declaration or statement at end of input
26 | }
| ^
|
s507643711
|
p00007
|
C
|
#include <stdio.h>
#include <math.h>
int main(void)
{
int n,i;
double x;
double y;
scanf("%f",&n);
x = 100;
for(i=0;1<=n;i++){
x=ceil(x*1.05);}
}
x=x*1000;
printf("%f",x);
return 0;
}
|
main.c:17:1: warning: data definition has no type or storage class
17 | x=x*1000;
| ^
main.c:17:1: error: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
main.c:17:3: error: initializer element is not constant
17 | x=x*1000;
| ^
main.c:19:10: error: expected declaration specifiers or '...' before string constant
19 | printf("%f",x);
| ^~~~
main.c:19:15: error: expected declaration specifiers or '...' before 'x'
19 | printf("%f",x);
| ^
main.c:21:4: error: expected identifier or '(' before 'return'
21 | return 0;
| ^~~~~~
main.c:22:1: error: expected identifier or '(' before '}' token
22 | }
| ^
|
s897273079
|
p00007
|
C
|
#include <stdio.h>
#include <math.h>
int main(void)
{
int n,i;
double x=100000;
scanf("%d",&n);
for(i=0;i<n;i++){
x=x*1.05;}
if(x%1000 != 0){
x += 1000 - (x%1000);
printf("%d\n",x);
return 0;
}
|
main.c: In function 'main':
main.c:12:10: error: invalid operands to binary % (have 'double' and 'int')
12 | if(x%1000 != 0){
| ^
main.c:13:22: error: invalid operands to binary % (have 'double' and 'int')
13 | x += 1000 - (x%1000);
| ^
main.c:19:1: error: expected declaration or statement at end of input
19 | }
| ^
|
s391123605
|
p00007
|
C
|
#include <stdio.h>
#include <math.h>
int main(void)
{
int n,i;
int x=100000;
scanf("%d",&n);
for(i=0;i<n;i++){
x=x*1.05;}
if(x%1000 != 0){
x += 1000 - (x%1000);
printf("%d\n",x);
return 0;
}
|
main.c: In function 'main':
main.c:19:1: error: expected declaration or statement at end of input
19 | }
| ^
|
s357444278
|
p00007
|
C
|
#include<stdio.h>
int main()
{
int a,i,j,k;
j=0;
a=100000;
scanf("%d",&i);
for(;j<=i;j++)
{
a=a*1.05;
k=a %1000;
a=a-k+1000
}
return 0;
}
|
main.c: In function 'main':
main.c:12:27: error: expected ';' before '}' token
12 | a=a-k+1000
| ^
| ;
13 | }
| ~
|
s874147357
|
p00007
|
C
|
#include <stdio.h>
int main(void){
int a=100000;
int i,n;
scanf_s("%d",&n);
for(i=0;i<n;i++){
a=a*1.05;
if(a%1000!=0)
a=(a/1000+1)*1000;
}
printf("%d\n",a);
return 0;
}
|
main.c: In function 'main':
main.c:7:3: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
7 | scanf_s("%d",&n);
| ^~~~~~~
| scanf
|
s288506142
|
p00007
|
C
|
#include<stdio.h>
int main()
{
int i,n;
int sum;
sum = 100000;
scanf("%d", &n);
for (i = 0; i < n; i++)
{
sum *= 1.05;
if(sum%1000 != 0)
{
sum/=1000;sum += 1; sum*= 1000;
}
5}
printf("%d\n", sum);
return 0;
}
|
main.c: In function 'main':
main.c:15:10: error: expected ';' before '}' token
15 | 5}
| ^
| ;
|
s443556631
|
p00007
|
C
|
#include <stdio.h>
#define debt 100000
int main(void){
int a = debt;
int i;
scanf("%d",&n);
for(i=0;i<n;i++){
a *= 1.05;
if(a%1000!=0)
a+=1000;
a=a/1000*1000;
}
printf("%.0d\n",a);
return 0;
}
|
main.c: In function 'main':
main.c:9:21: error: 'n' undeclared (first use in this function)
9 | scanf("%d",&n);
| ^
main.c:9:21: note: each undeclared identifier is reported only once for each function it appears in
|
s909693734
|
p00007
|
C
|
#include<iostream>
#include<stdio.h>
#include<math.h>
using namespace std;
int main(void){
int i,n;
double ans;
cin >> n;
ans=100.000;
for(i=0;i<n;i++){
ans*=1.05;
cout << i+1 << ":::" << ans << "->";
ans=(int)(ans+0.999);
cout << ans << "->";
ans=(double)ans;
cout << ans << endl;
}
ans*=1000;
printf("%d\n",(int)ans);
return 0;
}
|
main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s453737420
|
p00007
|
C
|
#include <stdio.h>
int main(void)
{
int n, i, result;
float dept, inter;
scanf("%d", &n);
debt = 100000;
for (i = 0; i < 5; i++){
inter = debt * 0.05;
debt *= debt + inter;
}
printf("%d\n", debt);
}
|
main.c: In function 'main':
main.c:9:9: error: 'debt' undeclared (first use in this function); did you mean 'dept'?
9 | debt = 100000;
| ^~~~
| dept
main.c:9:9: note: each undeclared identifier is reported only once for each function it appears in
|
s170118653
|
p00007
|
C
|
#include<stdio.h>
int main(){
int a,b,c,d,n,z;
z=0;
scanf("%d",&n);
if(n>50){
break;
}
for(a=0;a<10;a++){
for(b=0;b<10;b++){
for(c=0;c<10;c++){
for(d=0;d<10;d++){
if(a+b+c+d==n){
z++;
}
}
}
}
}
printf("%d\n",z);
return 0;
}
|
main.c: In function 'main':
main.c:7:3: error: break statement not within loop or switch
7 | break;
| ^~~~~
|
s669206804
|
p00007
|
C
|
#include<stdio.h>
int main(){
int a,b,c,d,n,z;
z=0;
scanf("%d",&n);
switch(n){
case n<=50;
for(a=0;a<10;a++){
for(b=0;b<10;b++){
for(c=0;c<10;c++){
for(d=0;d<10;d++){
if(a+b+c+d==n){
z++;
}
}
}
}
}
break;
case n>50;
break;
}
printf("%d\n",z);
return 0;
}
|
main.c: In function 'main':
main.c:7:13: error: expected ':' or '...' before ';' token
7 | case n<=50;
| ^
main.c:20:12: error: expected ':' or '...' before ';' token
20 | case n>50;
| ^
main.c:8:8: warning: statement will never be executed [-Wswitch-unreachable]
8 | for(a=0;a<10;a++){
| ~^~
|
s086456568
|
p00007
|
C
|
#include<stdio.h>
int main(){
int a,b,c,d,n,z;
z=0;
scanf("%d",&n);
switch(n){
case n<=50:
for(a=0;a<10;a++){
for(b=0;b<10;b++){
for(c=0;c<10;c++){
for(d=0;d<10;d++){
if(a+b+c+d==n){
z++;
}
}
}
}
}
break;
case n>50:
break;
}
printf("%d\n",z);
return 0;
}
|
main.c: In function 'main':
main.c:7:3: error: case label does not reduce to an integer constant
7 | case n<=50:
| ^~~~
main.c:20:3: error: case label does not reduce to an integer constant
20 | case n>50:
| ^~~~
|
s180902907
|
p00007
|
C
|
#include<stdio.h>
int main(){
int a,b,c,d,n,z;
z=0;
scanf("%d",&n);
switch(n){
case n<=50:
for(a=0;a<10;a++){
for(b=0;b<10;b++){
for(c=0;c<10;c++){
for(d=0;d<10;d++){
if(a+b+c+d==n){
z++;
}
}
}
}
}
break;
default
}
printf("%d\n",z);
return 0;
}
|
main.c: In function 'main':
main.c:7:3: error: case label does not reduce to an integer constant
7 | case n<=50:
| ^~~~
main.c:20:10: error: expected ':' before '}' token
20 | default
| ^
| :
21 | }
| ~
|
s525919849
|
p00007
|
C
|
#include<stdio.h>
int main(){
int a,b,c,d,n,z;
z=0;
scanf("%d",&n);
switch(n){
case n<=50:
for(a=0;a<10;a++){
for(b=0;b<10;b++){
for(c=0;c<10;c++){
for(d=0;d<10;d++){
if(a+b+c+d==n){
z++;
}
}
}
}
}
break;
default;
}
printf("%d\n",z);
return 0;
}
|
main.c: In function 'main':
main.c:7:3: error: case label does not reduce to an integer constant
7 | case n<=50:
| ^~~~
main.c:20:10: error: expected ':' before ';' token
20 | default;
| ^
| :
|
s752033798
|
p00007
|
C
|
#include<stdio.h>
int main()
{
int i,n,x,y;
int x =100000;
scanf("%d",&n);
for(i=1;i<n+1;i++){
x=x*1.05;
if(x%1000!=0)
x=(x/1000+1)*1000;
}
printf("%d\n",x);
return 0;
}
|
main.c: In function 'main':
main.c:6:13: error: redeclaration of 'x' with no linkage
6 | int x =100000;
| ^
main.c:5:17: note: previous declaration of 'x' with type 'int'
5 | int i,n,x,y;
| ^
|
s208258180
|
p00007
|
C
|
#include <stdio.h>
int main()
{
int n, i;
int ans = 100000;
scanf("%d", &n);
for (i = 0; i < n; i++) {
ans *= 1.05;
ans = ((ans+999)/1000) * 1000
}
printf("%d\n", ans);
return 0;
}
|
main.c: In function 'main':
main.c:12:38: error: expected ';' before '}' token
12 | ans = ((ans+999)/1000) * 1000
| ^
| ;
13 | }
| ~
|
s112418513
|
p00007
|
C
|
#include <stdio.h>
int main(void) {
int a,c,i;
int b;
scanf_s("%d", &a);
b = 100000;
for (i = 0; i < a; i++) {
b = b * 1.05;
}
c = b % 10000;
if (c!=0) {
b = b + 10000-c;
}
printf("%d", b);
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", &a);
| ^~~~~~~
| scanf
|
s644904199
|
p00007
|
C
|
#include <stdio.h>
int main(void) {
int a,c,i;
int b;
scanf_s("%d", &a);
b = 100000;
for (i = 0; i < a; i++) {
b = b * 1.05;
}
c = b % 10000;
if (c!=0) {
b = b + 10000-c;
}
printf("%d", b);
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", &a);
| ^~~~~~~
| scanf
|
s934217694
|
p00007
|
C
|
#include <stdio.h>
int main(void) {
int a,c,i;
int b;
scanf_s("%d", &a);
b = 100000;
for (i = 0; i < a; i++) {
b = b * 1.05;
}
c = b % 10000;
if (c!=0) {
b = b + 10000-c;
}
printf("%d", b);
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", &a);
| ^~~~~~~
| scanf
|
s333236944
|
p00007
|
C
|
#include<iostream>
using namespace std;
int main()
{
int n;
cin>>n;
cout<<100000+(5000*n+n*1000)<<endl;
return 0;
}
|
main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s508535857
|
p00007
|
C
|
package main
import "fmt"
var (
dept int = 100000
addDept int = dept / 100 * 5
)
func main() {
var week, nWeekDept int
fmt.Scan(&week)
if week != 0 {
nWeekDept = dept + addDept*week
}
if nWeekDept/addDept%2 != 0 {
nWeekDept += addDept
}
fmt.Println(nWeekDept)
}
|
main.c:1:1: error: unknown type name 'package'
1 | package main
| ^~~~~~~
main.c:3:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'import'
3 | import "fmt"
| ^~~~~~
|
s287747958
|
p00007
|
C
|
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int i,j,n;
__int64 ans=100000;
int main(){
scanf("%d",&n);
for(i=0;i<n;i++){
ans*=1.05;
if(ans%1000!=0)ans=(ans/1000+1)*1000;
}
printf("%lld\n",ans);
return 0;
}
|
main.c:6:1: error: unknown type name '__int64'; did you mean '__int64_t'?
6 | __int64 ans=100000;
| ^~~~~~~
| __int64_t
|
s541185307
|
p00007
|
C
|
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int i,j,n;
__int64 ans=100000;
int main(){
scanf("%d",&n);
for(i=0;i<n;i++){
ans*=1.05;
if(ans%1000!=0)ans=(ans/1000+1)*1000;
}
printf("%lld\n",ans);
return 0;
}
|
main.c:6:1: error: unknown type name '__int64'; did you mean '__int64_t'?
6 | __int64 ans=100000;
| ^~~~~~~
| __int64_t
|
s455544295
|
p00007
|
C
|
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int i,j,n;
__int64 ans=100000;
int main(){
scanf("%d",&n);
for(i=0;i<n;i++){
ans*=1.05;
if(ans%1000!=0)ans-=ans%1000,ans+=1000;
}
printf("%lld\n",ans);
return 0;
}
|
main.c:6:1: error: unknown type name '__int64'; did you mean '__int64_t'?
6 | __int64 ans=100000;
| ^~~~~~~
| __int64_t
|
s268114491
|
p00007
|
C
|
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int i,j,n;
__int64 ans=100000;
int main(){
scanf("%d",&n);
for(i=0;i<n;i++){
ans*=1.05;
if(ans%1000!=0)ans-=ans%1000,ans+=1000;
}
printf("%lld\n",ans);
return 0;
}
|
main.c:6:1: error: unknown type name '__int64'; did you mean '__int64_t'?
6 | __int64 ans=100000;
| ^~~~~~~
| __int64_t
|
s729841071
|
p00007
|
C
|
#include <stdio.h>
int main(void){
int n;
int amount=100000, tmp;
scanf("%d", &n);
for(i=0;i<n;i++){
amount *= 1.05;
tmp = amount % 1000;
if(tmp){
amount = amount - tmp + 1000;
}
}
printf("%d\n", amount);
return 0;
}
|
main.c: In function 'main':
main.c:8:7: error: 'i' undeclared (first use in this function)
8 | for(i=0;i<n;i++){
| ^
main.c:8:7: note: each undeclared identifier is reported only once for each function it appears in
|
s838702565
|
p00007
|
C
|
x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05,if(a%x)a+=x;}printf("%d\n",a);exit(0);}
|
main.c:1:1: warning: data definition has no type or storage class
1 | x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05,if(a%x)a+=x;}printf("%d\n",a);exit(0);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
main.c:1:8: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
1 | x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05,if(a%x)a+=x;}printf("%d\n",a);exit(0);}
| ^
main.c:1:17: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
1 | x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05,if(a%x)a+=x;}printf("%d\n",a);exit(0);}
| ^
main.c:1:19: error: return type defaults to 'int' [-Wimplicit-int]
1 | x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05,if(a%x)a+=x;}printf("%d\n",a);exit(0);}
| ^~~~
main.c: In function 'main':
main.c:1:19: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:1:27: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05,if(a%x)a+=x;}printf("%d\n",a);exit(0);}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05,if(a%x)a+=x;}printf("%d\n",a);exit(0);}
main.c:1:27: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05,if(a%x)a+=x;}printf("%d\n",a);exit(0);}
| ^~~~~
main.c:1:27: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:72: error: expected expression before 'if'
1 | x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05,if(a%x)a+=x;}printf("%d\n",a);exit(0);}
| ^~
main.c:1:85: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05,if(a%x)a+=x;}printf("%d\n",a);exit(0);}
| ^~~~~~
main.c:1:85: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:85: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:85: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:102: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
1 | x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05,if(a%x)a+=x;}printf("%d\n",a);exit(0);}
| ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
+++ |+#include <stdlib.h>
1 | x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05,if(a%x)a+=x;}printf("%d\n",a);exit(0);}
main.c:1:102: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
1 | x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05,if(a%x)a+=x;}printf("%d\n",a);exit(0);}
| ^~~~
main.c:1:102: note: include '<stdlib.h>' or provide a declaration of 'exit'
|
s048252642
|
p00007
|
C
|
x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05;a%x&&a+=x;}printf("%d\n",a);exit(0);}
|
main.c:1:1: warning: data definition has no type or storage class
1 | x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05;a%x&&a+=x;}printf("%d\n",a);exit(0);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
main.c:1:8: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
1 | x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05;a%x&&a+=x;}printf("%d\n",a);exit(0);}
| ^
main.c:1:17: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
1 | x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05;a%x&&a+=x;}printf("%d\n",a);exit(0);}
| ^
main.c:1:19: error: return type defaults to 'int' [-Wimplicit-int]
1 | x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05;a%x&&a+=x;}printf("%d\n",a);exit(0);}
| ^~~~
main.c: In function 'main':
main.c:1:19: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:1:27: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05;a%x&&a+=x;}printf("%d\n",a);exit(0);}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05;a%x&&a+=x;}printf("%d\n",a);exit(0);}
main.c:1:27: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05;a%x&&a+=x;}printf("%d\n",a);exit(0);}
| ^~~~~
main.c:1:27: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:78: error: lvalue required as left operand of assignment
1 | x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05;a%x&&a+=x;}printf("%d\n",a);exit(0);}
| ^~
main.c:1:83: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05;a%x&&a+=x;}printf("%d\n",a);exit(0);}
| ^~~~~~
main.c:1:83: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:83: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:83: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:100: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
1 | x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05;a%x&&a+=x;}printf("%d\n",a);exit(0);}
| ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
+++ |+#include <stdlib.h>
1 | x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05;a%x&&a+=x;}printf("%d\n",a);exit(0);}
main.c:1:100: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
1 | x=1000,a=100000,i;main(n){scanf("%d",&n);for(;i++<n;a/=x,a*=x){a*=1.05;a%x&&a+=x;}printf("%d\n",a);exit(0);}
| ^~~~
main.c:1:100: note: include '<stdlib.h>' or provide a declaration of 'exit'
|
s795401839
|
p00007
|
C
|
#include <stdio.h>
int main(){
int money=100000;
int remain;
int weeks;
int i;
scanf("%d", %weeks);
for(i=0; i<weeks; i++){
money*=1.05;
remain=money%1000;
money+=1000-remain;
}
printf("%d", money);
return 0;
}
|
main.c: In function 'main':
main.c:9:15: error: expected expression before '%' token
9 | scanf("%d", %weeks);
| ^
|
s414438838
|
p00007
|
C
|
#include<stdio.h>
main(){
int n,i,x,xx;
doble sum=100000;
scanf("%d",&n);
for(i=0;i<n;i++){
sum=sum*1.05;
x=sum/1000;
x=x*1000;
// y=sum-x;
if(sum-x > 0){
x=x+1000;
}
sum=x;
}
printf("%d\n",x);
return 0;
}
|
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main(){
| ^~~~
main.c: In function 'main':
main.c:4:3: error: unknown type name 'doble'; did you mean 'double'?
4 | doble sum=100000;
| ^~~~~
| double
|
s932601351
|
p00007
|
C
|
include<stdio.h>
#include<stdlib.h>
#include<math.h>
int sennen(double x, int up){
double k;
k = x / 1000;
if (up){
return ((int)ceil(k))* 1000;
}else{
return ((int)floor(k)) * 1000;
}
}
int perweek(int x, double rate){
double charged;
int high, low;
charged = x * rate;
high = sennen(charged, 1);
return high;
}
int main(){
int week;
int amount = 100000;
double rate = 1.05;
while(scanf("%i", &week) == 1){
for(;week > 0; week--){
amount = perweek(amount, rate);
}
printf("%d\n", amount);
}
return 0;
}
|
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
In file included from main.c:2:
/usr/include/stdlib.h:98:8: error: unknown type name 'size_t'
98 | extern size_t __ctype_get_mb_cur_max (void) __THROW __wur;
| ^~~~~~
/usr/include/stdlib.h:57:1: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
56 | #include <bits/floatn.h>
+++ |+#include <stddef.h>
57 |
/usr/include/stdlib.h:531:25: error: unknown type name 'size_t'
531 | size_t __statelen) __THROW __nonnull ((2));
| ^~~~~~
/usr/include/stdlib.h:531:25: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:561:25: error: unknown type name 'size_t'
561 | size_t __statelen,
| ^~~~~~
/usr/include/stdlib.h:561:25: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:661:42: error: unknown type name 'size_t'
661 | extern void arc4random_buf (void *__buf, size_t __size)
| ^~~~~~
/usr/include/stdlib.h:661:42: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:672:22: error: unknown type name 'size_t'
672 | extern void *malloc (size_t __size) __THROW __attribute_malloc__
| ^~~~~~
/usr/include/stdlib.h:672:22: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:675:22: error: unknown type name 'size_t'
675 | extern void *calloc (size_t __nmemb, size_t __size)
| ^~~~~~
/usr/include/stdlib.h:675:22: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:675:38: error: unknown type name 'size_t'
675 | extern void *calloc (size_t __nmemb, size_t __size)
| ^~~~~~
/usr/include/stdlib.h:675:38: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:683:36: error: unknown type name 'size_t'
683 | extern void *realloc (void *__ptr, size_t __size)
| ^~~~~~
/usr/include/stdlib.h:683:36: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:695:41: error: unknown type name 'size_t'
695 | extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
| ^~~~~~
/usr/include/stdlib.h:695:41: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:695:57: error: unknown type name 'size_t'
695 | extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
| ^~~~~~
/usr/include/stdlib.h:695:57: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:701:41: error: unknown type name 'size_t'
701 | extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
| ^~~~~~
/usr/include/stdlib.h:701:41: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:701:57: error: unknown type name 'size_t'
701 | extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
| ^~~~~~
/usr/include/stdlib.h:701:57: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
In file included from /usr/include/stdlib.h:706:
/usr/include/alloca.h:32:22: error: unknown type name 'size_t'
32 | extern void *alloca (size_t __size) __THROW;
| ^~~~~~
/usr/include/alloca.h:25:1: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
24 | #include <stddef.h>
+++ |+#include <stddef.h>
25 |
/usr/include/stdlib.h:712:22: error: unknown type name 'size_t'
712 | extern void *valloc (size_t __size) __THROW __attribute_malloc__
| ^~~~~~
/usr/include/stdlib.h:712:22: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:718:45: error: unknown type name 'size_t'
718 | extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
| ^~~~~~
/usr/include/stdlib.h:718:45: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:718:65: error: unknown type name 'size_t'
718 | extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
| ^~~~~~
/usr/include/stdlib.h:718:65: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:724:29: error: unknown type name 'size_t'
724 | extern void *aligned_alloc (size_t __alignment, size_t __size)
| ^~~~~~
/usr/include/stdlib.h:724:29: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:724:49: error: unknown type name 'size_t'
724 | extern void *aligned_alloc (size_t __alignment, size_t __size)
| ^~~~~~
/usr/include/stdlib.h:724:49: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:961:23: error: unknown type name 'size_t'
961 | size_t __nmemb, size_t __size, __compar_fn_t __compar)
| ^~~~~~
/usr/include/stdlib.h:961:23: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:961:39: error: unknown type name 'size_t'
961 | size_t __nmemb, size_t __size, __compar_fn_t __compar)
| ^~~~~~
/usr/include/stdlib.h:961:39: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:970:34: error: unknown type name 'size_t'
970 | extern void qsort (void *__base, size_t __nmemb, size_t __size,
| ^~~~~~
/usr/include/stdlib.h:970:34: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:970:50: error: unknown type name 'size_t'
970 | extern void qsort (void *__base, size_t __nmemb, size_t __size,
| ^~~~~~
/usr/include/stdlib.h:970:50: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1044:20: error: unknown type name 'size_t'
1044 | size_t __len) __THROW __nonnull ((3, 4, 5));
| ^~~~~~
/usr/include/stdlib.h:1044:20: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1047:20: error: unknown type name 'size_t'
1047 | size_t __len) __THROW __nonnull ((3, 4, 5));
| ^~~~~~
/usr/include/stdlib.h:1047:20: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1051:45: error: unknown type name 'size_t'
1051 | char *__restrict __buf, size_t __len)
| ^~~~~~
/usr/include/stdlib.h:1051:45: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1055:45: error: unknown type name 'size_t'
1055 | char *__restrict __buf, size_t __len)
| ^~~~~~
/usr/include/stdlib.h:1055:45: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1062:36: error: unknown type name 'size_t'
1062 | extern int mblen (const char *__s, size_t __n) __THROW;
| ^~~~~~
/usr/include/stdlib.h:1062:36: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1066:48: error: unknown type name 'size_t'
1066 | const char *__restrict __s, size_t __n) __THROW;
| ^~~~~~
/usr/include/stdlib.h:1066:48: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1073:8: error: unknown type name 'size_t'
1073 | extern size_t mbstowcs (wchar_t *__restrict __pwcs,
| ^~~~~~
/usr/include/stdlib.h:1073:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1074:53: error: unknown type name 'size_t'
1074 | const char *__restrict __s, size_t __n) __THROW
| ^~~~~~
/usr/include/stdlib.h:1074:53: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/stdlib.h:1077:8: error: unknown type name 'size_t'
1077 | extern size_t wcstombs (char *__restrict __s,
| ^~~~~~
/usr/include/stdlib.h:1077:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably
|
s778364058
|
p00007
|
C
|
#include <stdio.h>
#define DEBT 100000
int main()
{
int n, i, mny = DBT, intrst = DEBT * 0.05;
scanf("%d", &n);
for (i = 0; i < n; i++){
mny += intrst;
}
if (mny % 10000 > 0) {
mny = mny - (mny % 10000) + 10000;
}
printf("%d\n", mny);
return 0;
}
|
main.c: In function 'main':
main.c:6:19: error: 'DBT' undeclared (first use in this function); did you mean 'DEBT'?
6 | int n, i, mny = DBT, intrst = DEBT * 0.05;
| ^~~
| DEBT
main.c:6:19: note: each undeclared identifier is reported only once for each function it appears in
|
s133193383
|
p00007
|
C
|
#include<stdio.h>
int main(void)
{
int a,i,n;
int x=100000;
scanf("%d",&n);
for(i=0;i<n;i++){
x=x*105/100;
if(x%1000 != 0){
x=(x/1000+1)*1000;
}
}
printf("%d",x);
return 0;
|
main.c: In function 'main':
main.c:14:5: error: expected declaration or statement at end of input
14 | return 0;
| ^~~~~~
|
s479902453
|
p00007
|
C
|
#include<iostream>
using namespace std;
#define RENT 100000
int main(){
int n;
while(cin>>n){
int ans;
ans=RENT;
for(int i=0;i<n;i++){
ans=ans*1.05;
if(ans%1000>0){
ans=ans+1000-ans%1000;
}
}
cout<<ans;
}
}
|
main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s353904880
|
p00007
|
C
|
main(n,r){for(scanf("%d",&n),r=1e5;n--;r=r%1e3?(r/1e3+1)*1e3:r)r+=r/20;printf("%d\n",r);exit(0);}
|
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(n,r){for(scanf("%d",&n),r=1e5;n--;r=r%1e3?(r/1e3+1)*1e3:r)r+=r/20;printf("%d\n",r);exit(0);}
| ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'r' defaults to 'int' [-Wimplicit-int]
main.c:1:15: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | main(n,r){for(scanf("%d",&n),r=1e5;n--;r=r%1e3?(r/1e3+1)*1e3:r)r+=r/20;printf("%d\n",r);exit(0);}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | main(n,r){for(scanf("%d",&n),r=1e5;n--;r=r%1e3?(r/1e3+1)*1e3:r)r+=r/20;printf("%d\n",r);exit(0);}
main.c:1:15: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | main(n,r){for(scanf("%d",&n),r=1e5;n--;r=r%1e3?(r/1e3+1)*1e3:r)r+=r/20;printf("%d\n",r);exit(0);}
| ^~~~~
main.c:1:15: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:43: error: invalid operands to binary % (have 'int' and 'double')
1 | main(n,r){for(scanf("%d",&n),r=1e5;n--;r=r%1e3?(r/1e3+1)*1e3:r)r+=r/20;printf("%d\n",r);exit(0);}
| ^
main.c:1:72: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | main(n,r){for(scanf("%d",&n),r=1e5;n--;r=r%1e3?(r/1e3+1)*1e3:r)r+=r/20;printf("%d\n",r);exit(0);}
| ^~~~~~
main.c:1:72: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:72: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:72: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:89: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
1 | main(n,r){for(scanf("%d",&n),r=1e5;n--;r=r%1e3?(r/1e3+1)*1e3:r)r+=r/20;printf("%d\n",r);exit(0);}
| ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
+++ |+#include <stdlib.h>
1 | main(n,r){for(scanf("%d",&n),r=1e5;n--;r=r%1e3?(r/1e3+1)*1e3:r)r+=r/20;printf("%d\n",r);exit(0);}
main.c:1:89: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
1 | main(n,r){for(scanf("%d",&n),r=1e5;n--;r=r%1e3?(r/1e3+1)*1e3:r)r+=r/20;printf("%d\n",r);exit(0);}
| ^~~~
main.c:1:89: note: include '<stdlib.h>' or provide a declaration of 'exit'
|
s249598996
|
p00007
|
C
|
#include<cstdio>
int main(){
int n;
scanf("%d",&n);
int a=100000;
for(int i=0;i<n;i++)
{
a*=1.05;
if(a%1000!=0){
a=(a/1000)*1000;
a+=1000;
}
}
printf("%d\n",a);
return 0;
}
|
main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s248015737
|
p00007
|
C
|
#include<stdio.h>
int main(){
int n,syakkin;
scanf("%d",&n);
syakkin=(int)100000*(1+0.05*n)+9999;
syakkin=(syakkin/10000)*10000;
printf("%d",syakkin);
return 0;
}
|
main.c: In function 'main':
main.c:4:12: error: stray '\343' in program
4 | int<U+3000>n,syakkin;
| ^~~~~~~~
|
s757631904
|
p00007
|
C
|
#include<stdio.h>
int main(){
int n,syakkin;
scanf("%d",&n);
syakkin=100000;
for(i=0;i<n;i++){
syakkin=syakkin*1.05+999;
syakkin=(syakkin/1000)*1000;
}
printf("%d\n",syakkin);
return 0;
}
|
main.c: In function 'main':
main.c:8:13: error: 'i' undeclared (first use in this function)
8 | for(i=0;i<n;i++){
| ^
main.c:8:13: note: each undeclared identifier is reported only once for each function it appears in
|
s845851805
|
p00007
|
C
|
#include <iostream>
#include <cstring>
using namespace std;
int n,sg[55];
void mex()
{
bool vis[55];
memset(sg,0,sizeof(sg));
for(int i = 2; i <= 50; i++)
{
memset(vis,false,sizeof(vis));
for(int j = 0; j <= i-2; j++)
vis[ sg[j] ^ sg[i-j-2] ] = true;
for(int j = 0; j <= 55; j++)
if(!vis[j])
{
sg[i] = j;
break;
}
}
}
int main()
{
mex();
while(cin >> n)
{
int a,s = 0;
for(int i = 0; i < n; i++)
{
cin >> a;
s ^= sg[a];
}
if(s)
cout << "Yes\n";
else
cout << "No\n";
}
return 0;
}
|
main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s583000370
|
p00007
|
C
|
#include<stdio.h>
int main{
int n;
int i;
int ans;
int a = 100000;
scanf("%d", &n);
for(i = n; i >= 1; i--){
ab *= 1.05;
if(ab % 1000 > 0){
ans = ab / 1000 + 1 * 1000;
}else{
ans = ab;
}
}
printf("%d\n", ans);
return 0;
}
|
main.c:3:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
3 | int main{
| ^
|
s731239051
|
p00007
|
C
|
#include <stdio.h>
int main()
{
int d=100000,n,i;
scanf("%d",&n);
for(i=0;i<n;i++){
d*=1.05
}
d=(int)d;
if(d%10000!=0){
d = d - d%10000 +10000;
}
printf("%d\n",d);
return 0;
}
|
main.c: In function 'main':
main.c:9:24: error: expected ';' before '}' token
9 | d*=1.05
| ^
| ;
10 | }
| ~
|
s186881891
|
p00007
|
C
|
#include <stdio.h>
int main()
{
double d=100000.0
int n,i;
scanf("%d",&n);
for(i=0;i<n;i++){
d*=1.05;
}
if((int)d%10000!=0){
d = (int)d - (int)d%10000 +10000;
}
printf("%d\n",(int)d);
return 0;
}
|
main.c: In function 'main':
main.c:6:9: error: expected ',' or ';' before 'int'
6 | int n,i;
| ^~~
main.c:8:21: error: 'n' undeclared (first use in this function)
8 | scanf("%d",&n);
| ^
main.c:8:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:13: error: 'i' undeclared (first use in this function)
9 | for(i=0;i<n;i++){
| ^
|
s424566782
|
p00007
|
C
|
include<stdio.h>
int main(){
int a,y,n,money=10000;
scanf("%d",&n);
for(a=0;a<n;a++){
money=money+money/100*5;
}
y=money%1000;
money=money/1000;
if(y>=500){
money=money+1;
}
money=money*10000;
printf("%d\n",money);
return (0);
}
|
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s267583003
|
p00007
|
C
|
include<stdio.h>
int main(){
int a,y,n,money=10000;
scanf("%d",&n);
for(a=0;a<n;a++){
money=money+money/100*5;
}
y=money%1000;
money=money/1000;
if(y>=5){
money=money+1;
}
money=money*10000;
printf("%d\n",money);
return (0);
}
|
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s577296348
|
p00007
|
C
|
#include <stdio.h>
int main()
{
int n,i;
unsinged long int debt_price;
scanf("%d",&n);
debt_price = 100000;
for(i=0; i<n; i++){
debt_price *= 1.05;
debt_price = debt_price/1000 * 1000 +1000
}
printf("%lu\n",debt_price);
return 0;
}
|
main.c: In function 'main':
main.c:5:3: error: 'unsinged' undeclared (first use in this function)
5 | unsinged long int debt_price;
| ^~~~~~~~
main.c:5:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:11: error: expected ';' before 'long'
5 | unsinged long int debt_price;
| ^~~~~
| ;
main.c:7:3: error: 'debt_price' undeclared (first use in this function)
7 | debt_price = 100000;
| ^~~~~~~~~~
main.c:10:49: error: expected ';' before '}' token
10 | debt_price = debt_price/1000 * 1000 +1000
| ^
| ;
11 | }
| ~
|
s791143173
|
p00007
|
C
|
#include <stdio.h>
int main()
{
int n,i;
unsigned long int debt_price;
scanf("%d",&n);
debt_price = 100000;
for(i=0; i<n; i++){
debt_price *= 1.05;
if(debt_price % 1000 )
debt price =(debt_price/1000+1)*1000;
}
printf("%lu\n",debt_price);
return 0;
}
|
main.c: In function 'main':
main.c:11:8: error: 'debt' undeclared (first use in this function)
11 | debt price =(debt_price/1000+1)*1000;
| ^~~~
main.c:11:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:12: error: expected ';' before 'price'
11 | debt price =(debt_price/1000+1)*1000;
| ^~~~~~
| ;
|
s634277022
|
p00007
|
C
|
#include <stdio.h>
int main( void ) {
int n, debt = 100000;
for ( scanf( "%d", &n ); n--; debt = ( (int)( debt * 1.05 - 1 ) / 1000 + 1 ) * 1000; ) ;
printf( "%d\n", debt );
return 0;
}
|
main.c: In function 'main':
main.c:6:92: error: expected ')' before ';' token
6 | for ( scanf( "%d", &n ); n--; debt = ( (int)( debt * 1.05 - 1 ) / 1000 + 1 ) * 1000; ) ;
| ~ ^
| )
|
s137470930
|
p00007
|
C
|
#include <stdio.h>
int main( void ) {
int n, debt = 100000;
for ( scanf( "%d", &n ); n--; debt = ( (int)( debt * 1.05 - 1 ) / 1000 + 1 ) * 1000; ) ;
printf( "%d\n", debt );
return 0;
}
|
main.c: In function 'main':
main.c:6:92: error: expected ')' before ';' token
6 | for ( scanf( "%d", &n ); n--; debt = ( (int)( debt * 1.05 - 1 ) / 1000 + 1 ) * 1000; ) ;
| ~ ^
| )
|
s837690254
|
p00007
|
C
|
#include <stdio.h>
#include <iostream>
using namespace std;
void keisan(int *n){
int kari1,kari2;
kari1 = *n * 1.05;
if((kari1 % 1000) > 0) {
kari2 = kari1 / 1000;
*n = kari2 * 1000 + 1000;
} else {
*n = kari1;
}
}
int main() {
int syakkin = 100000;
int a;
cin >> a;
for (int i = 0; i < a; i++){
keisan(&syakkin);
}
cout << syakkin << endl;
return 0;
}
|
main.c:2:10: fatal error: iostream: No such file or directory
2 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s582139632
|
p00007
|
C
|
#include <stdio.h>
int main(void){
int n;
scanf("%d",&n);
int coin=100000;
for(int m=0;m<n;m++){
coin+=coin*0.05;
coin+=5;
coin/=10;
coin*=10;
coin+=50;
coin/=100:
coin*=100:
coin+=500;
coin/=1000;
coin*=1000;
}
printf("%d\n",coin);
return 0;
}
|
main.c: In function 'main':
main.c:13:10: error: expected ';' before ':' token
13 | coin/=100:
| ^
| ;
|
s178036220
|
p00007
|
C
|
#include<stdio.h>
#include<string.h>
#include<math.h>
int main(void)
{
int n,i,tmp,sur;
tmp=100000;
scanf("%d",&n);
for(i=1;i<=n;i++){
tmp=tmp*1.05;
sur=tmp%1000;
if(a!=0)
tmp+=1000-sur;
}
printf("%d\n",tmp);
return 0;
}
|
main.c: In function 'main':
main.c:13:8: error: 'a' undeclared (first use in this function)
13 | if(a!=0)
| ^
main.c:13:8: note: each undeclared identifier is reported only once for each function it appears in
|
s629531834
|
p00007
|
C
|
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main(){
double i,n,answer,v;
int r;
while(scanf("%lf",&n)==1){
answer=100000;
for(i=0;i<n;++i){
answer+=100000*0.05;
}
v= answer/10000;
answer=floor(v);
if(v-answer>=0.1){
++answer;
}
r=answer*10000;
printf("%d",r);
}
exit 0;
}
|
main.c: In function 'main':
main.c:26:7: error: expected ';' before numeric constant
26 | exit 0;
| ^~
| ;
|
s382994653
|
p00007
|
C++
|
#include<iostream>
using namespace std;
int main(){
int n,ans=100000;
cin>>n;
while(int i=0;i<n;i++){
ans=ans*1.05;
if(ans%1000){
ans=(ans\1000)*1000+1000;
}
cout<<ans<<endl;
return 0;
}
|
a.cc:9:9: error: stray '\' in program
9 | ans=(ans\1000)*1000+1000;
| ^
a.cc: In function 'int main()':
a.cc:6:14: error: expected ')' before ';' token
6 | while(int i=0;i<n;i++){
| ~ ^
| )
a.cc:6:15: error: 'i' was not declared in this scope
6 | while(int i=0;i<n;i++){
| ^
a.cc:13:2: error: expected '}' at end of input
13 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s999577320
|
p00007
|
C++
|
#include<iostream>
using namespace std;
int main(){
int n,ans=100000;
cin>>n;
while(int i=0;i<n;i++){
ans=ans*1.05;
if(ans%1000)ans=(ans\1000)*1000+1000;
}
cout<<ans<<endl;
return 0;
}
|
a.cc:8:21: error: stray '\' in program
8 | if(ans%1000)ans=(ans\1000)*1000+1000;
| ^
a.cc: In function 'int main()':
a.cc:6:14: error: expected ')' before ';' token
6 | while(int i=0;i<n;i++){
| ~ ^
| )
a.cc:6:15: error: 'i' was not declared in this scope
6 | while(int i=0;i<n;i++){
| ^
|
s601737089
|
p00007
|
C++
|
#include<iostream>
using namespace std;
int main(){
int n,ans=100000;
cin>>n;
for(int i=0;i<n;i++){
ans=ans*1.05;
if(ans%1000)ans=(ans\1000)*1000+1000;
}
cout<<ans<<endl;
return 0;
}
|
a.cc:8:21: error: stray '\' in program
8 | if(ans%1000)ans=(ans\1000)*1000+1000;
| ^
a.cc: In function 'int main()':
a.cc:8:21: error: expected ')' before numeric constant
8 | if(ans%1000)ans=(ans\1000)*1000+1000;
| ~ ^~~~~
| )
|
s486435838
|
p00007
|
C++
|
#include<iostream>
#include<string>
#include<cmath>
#include<cstdio>
#include<vector>
#include<stack>
#include<queue>
#include<algorithm>
#include<complex>
using namespace std ;
typedef vector<int> vi ;
typedef vector<vi> vvi ;
typedef vector<string> vs ;
typedef pair<int, int> pii;
typedef long long ll ;
#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
int main(void){
int n ;
cin >> n;
int m = 100000;
repp(i,n){
m *= 1.05;
if((int)m % 1000 != 0)
m = m - (int) m % 1000 + 1000;
}
cout << m << endl;
}
|
a.cc: In function 'int main()':
a.cc:25:8: error: 'i' was not declared in this scope
25 | repp(i,n){
| ^
a.cc:25:3: error: 'repp' was not declared in this scope; did you mean 'rep'?
25 | repp(i,n){
| ^~~~
| rep
|
s176641888
|
p00007
|
C++
|
#include <iostream>
using namespace std;
int main(){
int n, t = 100000;
cin >> n;
for( int i = 0; i < n; ++i){
t = 1.05 * t;
t = (t/1000)*1000 + ((t % 1000 != 0) ? 1000 : 0);
}
cout << t << "\n";
return 0;
|
a.cc: In function 'int main()':
a.cc:12:18: error: expected '}' at end of input
12 | return 0;
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s986432916
|
p00007
|
C++
|
#include <iostream>
using namespase std;
int main () {
int n, i;
double a = 100000;
cin >> n;
for(i=0;i<n;i++) {
a *= 1.05;
while(a%1000!=0) {
a += 1;
}
}
cout << a << endl;
}
|
a.cc:2:7: error: expected nested-name-specifier before 'namespase'
2 | using namespase std;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin >> n;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:10:16: error: invalid operands of types 'double' and 'int' to binary 'operator%'
10 | while(a%1000!=0) {
| ~^~~~~
| | |
| | int
| double
a.cc:14:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
14 | cout << a << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:14:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
14 | cout << a << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.