Submission #1540010


Source Code Expand

long a,b,c,d,n;main(){scanf("%d%d%d%d%d",&a,&b,&c,&d,&n);a+a>b||(b=a+a);b+b>c||(c=b+b);c+c>d||(d=c+c);printf("%ld\n",n/2*d+n%2*c);}

Submission Info

Submission Time
Task A - Ice Tea Store
User kotatsugame
Language C (GCC 5.4.1)
Score 300
Code Size 131 Byte
Status AC
Exec Time 1 ms
Memory 128 KB

Compile Error

./Main.c:1:16: warning: return type defaults to ‘int’ [-Wimplicit-int]
 long a,b,c,d,n;main(){scanf("%d%d%d%d%d",&a,&b,&c,&d,&n);a+a>b||(b=a+a);b+b>c||(c=b+b);c+c>d||(d=c+c);printf("%ld\n",n/2*d+n%2*c);}
                ^
./Main.c: In function ‘main’:
./Main.c:1:23: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
 long a,b,c,d,n;main(){scanf("%d%d%d%d%d",&a,&b,&c,&d,&n);a+a>b||(b=a+a);b+b>c||(c=b+b);c+c>d||(d=c+c);printf("%ld\n",n/2*d+n%2*c);}
                       ^
./Main.c:1:23: warning: incompatible implicit declaration of built-in function ‘scanf’
./Main.c:1:23: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
./Main.c:1:29: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘long int *’ [-Wformat=]
 long a,b,c,d,n;main(){scanf("%d%d%d%d%d",&a,&b,&c,&d,&n);a+a>b||(b=a+a);b+b>c||(c=b+b);c+c>d||(d=c+c);printf("%ld\n",n/2*d+n%2*c);}
                             ^
./Main.c:1:29: warning: format ‘%d’ expects argument of type ‘int *’...

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 4
AC × 23
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt
All sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, subtask_1_01.txt, subtask_1_02.txt, subtask_1_03.txt, subtask_1_04.txt, subtask_1_05.txt, subtask_1_06.txt, subtask_1_07.txt, subtask_1_08.txt, subtask_1_09.txt, subtask_1_10.txt, subtask_1_11.txt, subtask_1_12.txt, subtask_1_13.txt, subtask_1_14.txt, subtask_1_15.txt
Case Name Status Exec Time Memory
sample_01.txt AC 1 ms 128 KB
sample_02.txt AC 0 ms 128 KB
sample_03.txt AC 0 ms 128 KB
sample_04.txt AC 1 ms 128 KB
subtask_1_01.txt AC 1 ms 128 KB
subtask_1_02.txt AC 1 ms 128 KB
subtask_1_03.txt AC 1 ms 128 KB
subtask_1_04.txt AC 0 ms 128 KB
subtask_1_05.txt AC 1 ms 128 KB
subtask_1_06.txt AC 1 ms 128 KB
subtask_1_07.txt AC 1 ms 128 KB
subtask_1_08.txt AC 0 ms 128 KB
subtask_1_09.txt AC 1 ms 128 KB
subtask_1_10.txt AC 1 ms 128 KB
subtask_1_11.txt AC 1 ms 128 KB
subtask_1_12.txt AC 1 ms 128 KB
subtask_1_13.txt AC 0 ms 128 KB
subtask_1_14.txt AC 1 ms 128 KB
subtask_1_15.txt AC 1 ms 128 KB