Submission #1272354


Source Code Expand

i=1;main(a,b,c,x){for(scanf("%d%d%d",&a,&b,&c);~a&~b&~c&1&&31&++i;x=a+b+c,a=x-a>>1,b=x-b>>1,c=x-c>>1);printf("%d",i%32-1);}

Submission Info

Submission Time
Task A - Cookie Exchanges
User hanada3355
Language C (GCC 5.4.1)
Score 300
Code Size 123 Byte
Status AC
Exec Time 1 ms
Memory 128 KB

Compile Error

./Main.c:1:1: warning: data definition has no type or storage class
 i=1;main(a,b,c,x){for(scanf("%d%d%d",&a,&b,&c);~a&~b&~c&1&&31&++i;x=a+b+c,a=x-a>>1,b=x-b>>1,c=x-c>>1);printf("%d",i%32-1);}
 ^
./Main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int]
./Main.c:1:5: warning: return type defaults to ‘int’ [-Wimplicit-int]
 i=1;main(a,b,c,x){for(scanf("%d%d%d",&a,&b,&c);~a&~b&~c&1&&31&++i;x=a+b+c,a=x-a>>1,b=x-b>>1,c=x-c>>1);printf("%d",i%32-1);}
     ^
./Main.c: In function ‘main’:
./Main.c:1:5: warning: type of ‘a’ defaults to ‘int’ [-Wimplicit-int]
./Main.c:1:5: warning: type of ‘b’ defaults to ‘int’ [-Wimplicit-int]
./Main.c:1:5: warning: type of ‘c’ defaults to ‘int’ [-Wimplicit-int]
./Main.c:1:5: warning: type of ‘x’ defaults to ‘int’ [-Wimplicit-int]
./Main.c:1:23: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
 i=1;main(a,b,c,x){for(scanf("%d%d%d",&a,&b,&c);~a&~b&~c&1&&31&++i;x=a+b+c,a=x-a>>1,b=x-b>>1,c=x-c>>1);printf("%d",i%32-1);}
       ...

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 17
Set Name Test Cases
Sample sample1.txt, sample2.txt, sample3.txt
All sample1.txt, sample2.txt, sample3.txt, in1.txt, in10.txt, in11.txt, in2.txt, in3.txt, in4.txt, in5.txt, in6.txt, in7.txt, in8.txt, in9.txt, sample1.txt, sample2.txt, sample3.txt
Case Name Status Exec Time Memory
in1.txt AC 0 ms 128 KB
in10.txt AC 0 ms 128 KB
in11.txt AC 1 ms 128 KB
in2.txt AC 0 ms 128 KB
in3.txt AC 0 ms 128 KB
in4.txt AC 1 ms 128 KB
in5.txt AC 1 ms 128 KB
in6.txt AC 0 ms 128 KB
in7.txt AC 0 ms 128 KB
in8.txt AC 1 ms 128 KB
in9.txt AC 0 ms 128 KB
sample1.txt AC 0 ms 128 KB
sample2.txt AC 1 ms 128 KB
sample3.txt AC 0 ms 128 KB