Submission #1859490


Source Code Expand

#include<stdio.h>
void main()
{ int i, j[20], k, l, m; 
printf("enter the no of skewer");
scanf("%d",&m);
for(i=0;i<21;i++)
{
printf("enter the no of meals");
scanf("%d",&j[i]);
l=m+j[i];
}
if(m<21)
printf("%d",m); 
else
printf("%d",l);
}

Submission Info

Submission Time
Task A - BBQ Easy
User Gaurav17074008
Language C (GCC 5.4.1)
Score 0
Code Size 253 Byte
Status RE
Exec Time 1 ms
Memory 128 KB

Compile Error

./Main.c: In function ‘main’:
./Main.c:5:1: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
 scanf("%d",&m);
 ^
./Main.c:9:1: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
 scanf("%d",&j[i]);
 ^
./Main.c:10:6: warning: iteration 20u invokes undefined behavior [-Waggressive-loop-optimizations]
 l=m+j[i];
      ^
./Main.c:6:1: note: containing loop
 for(i=0;i<21;i++)
 ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 200
Status
RE × 2
RE × 12
Set Name Test Cases
Sample sample-01.txt, sample-02.txt
All sample-01.txt, sample-02.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, sample-01.txt, sample-02.txt
Case Name Status Exec Time Memory
01-01.txt RE 1 ms 128 KB
01-02.txt RE 1 ms 128 KB
01-03.txt RE 1 ms 128 KB
01-04.txt RE 1 ms 128 KB
01-05.txt RE 1 ms 128 KB
01-06.txt RE 1 ms 128 KB
01-07.txt RE 1 ms 128 KB
01-08.txt RE 1 ms 128 KB
sample-01.txt RE 1 ms 128 KB
sample-02.txt RE 1 ms 128 KB