Submission #2594134


Source Code Expand

#include <stdio.h>
int main(void) {
 long long int Q,H,S,D,N,twoL,Sum=0,YJ,oneL;
 scanf("%ld%ld%ld%ld",&Q,&H,&S,&D);
 scanf("%ld",&N);
 oneL=S;
if(oneL>2*H){oneL=2*H;};
if(oneL>4*Q){oneL=4*Q;};
if(2*oneL>D){twoL=D;}
else{twoL=2*oneL;}
Sum=(N-(N%2))/2*twoL+N%2*oneL;
 printf("%ld\n",Sum);
 return 0;
 }

Submission Info

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

Compile Error

./Main.c: In function ‘main’:
./Main.c:4:8: warning: format ‘%ld’ expects argument of type ‘long int *’, but argument 2 has type ‘long long int *’ [-Wformat=]
  scanf("%ld%ld%ld%ld",&Q,&H,&S,&D);
        ^
./Main.c:4:8: warning: format ‘%ld’ expects argument of type ‘long int *’, but argument 3 has type ‘long long int *’ [-Wformat=]
./Main.c:4:8: warning: format ‘%ld’ expects argument of type ‘long int *’, but argument 4 has type ‘long long int *’ [-Wformat=]
./Main.c:4:8: warning: format ‘%ld’ expects argument of type ‘long int *’, but argument 5 has type ‘long long int *’ [-Wformat=]
./Main.c:5:8: warning: format ‘%ld’ expects argument of type ‘long int *’, but argument 2 has type ‘long long int *’ [-Wformat=]
  scanf("%ld",&N);
        ^
./Main.c:12:9: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘long long int’ [-Wformat=]
  printf("%ld\n",Sum);
         ^
./Main.c:4:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-...

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 1 ms 128 KB
sample_03.txt AC 1 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 1 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 1 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 1 ms 128 KB
subtask_1_14.txt AC 1 ms 128 KB
subtask_1_15.txt AC 1 ms 128 KB