Submission #16727420


Source Code Expand

Copy
a;c;main(d,b){for(;d=getchar()+1;b=d)d-51?d-54?:b-51?c=0:(a+=++c):b-54?c=0:0;printf("%d\n",a);}

Submission Info

Submission Time
Task B - ニコニコ文字列
User myun
Language C (GCC 9.2.1)
Score 100
Code Size 95 Byte
Status
Exec Time 6 ms
Memory 1644 KB

Compile Error

./Main.c:1:1: warning: data definition has no type or storage class
    1 | a;c;main(d,b){for(;d=getchar()+1;b=d)d-51?d-54?:b-51?c=0:(a+=++c):b-54?c=0:0;printf("%d\n",a);}
      | ^
./Main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int]
./Main.c:1:3: warning: data definition has no type or storage class
    1 | a;c;main(d,b){for(;d=getchar()+1;b=d)d-51?d-54?:b-51?c=0:(a+=++c):b-54?c=0:0;printf("%d\n",a);}
      |   ^
./Main.c:1:3: warning: type defaults to ‘int’ in declaration of ‘c’ [-Wimplicit-int]
./Main.c:1:5: warning: return type defaults to ‘int’ [-Wimplicit-int]
    1 | a;c;main(d,b){for(;d=getchar()+1;b=d)d-51?d-54?:b-51?c=0:(a+=++c):b-54?c=0:0;printf("%d\n",a);}
      |     ^~~~
./Main.c: In function ‘main’:
./Main.c:1:5: warning: type of ‘d’ defaults to ‘int’ [-Wimplicit-int]
./Main.c:1:5: warning: type of ‘b’ defaults to ‘int’ [-Wimplicit-int]
./Main.c:1:22: warning: implicit declaration of function ‘getchar’ [-Wimplicit-function-declaration]
    1 | a;c;main(d,b){for(;d=getchar()+1;b=d)d-51?d-54?:b-51?c=0:(a+=++c):b-54?c=0:0;printf("%d\n",a);}
      |                      ^~~~~~~
./Main.c:1:1: note: ‘getchar’ is defined in header ‘<stdio.h>’; did you forget to ‘#include <stdio.h>’?
  +++ |+#include <stdio.h>
    1 | a;c;main(d,b){for(;d=getchar()+1;b=d)d-51?d-54?:b-51?c=0:(a+=++c):b-54?c=0:0;printf("%d\n",a);}
./Main.c:1:78: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
    1 | a;c;main(d,b){for(;d=getchar()+1;b=d)d-51?d-54?:b-51?c=0:(a+=++c):b-54?c=0:0;printf("%d\n",a);}
      |                                                                              ^~~~~~
./Main.c:1:78: warning: incompatible implicit declaration of built-in function ‘printf’
./Main.c:1:78: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’

Judge Result

Set Name Sample Subtask1 All
Score / Max Score 0 / 0 30 / 30 70 / 70
Status
× 5
× 18
× 30
Set Name Test Cases
Sample subtask0_sample_01.txt, subtask0_sample_02.txt, subtask0_sample_03.txt, subtask0_sample_04.txt, subtask0_sample_05.txt
Subtask1 subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask0_sample_01.txt, subtask0_sample_02.txt, subtask0_sample_03.txt, subtask0_sample_04.txt, subtask0_sample_05.txt
All subtask0_sample_01.txt, subtask0_sample_02.txt, subtask0_sample_03.txt, subtask0_sample_04.txt, subtask0_sample_05.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask2_01.txt, subtask2_02.txt, subtask2_03.txt, subtask2_04.txt, subtask2_05.txt, subtask2_06.txt, subtask2_07.txt, subtask2_08.txt, subtask2_09.txt, subtask2_10.txt, subtask2_11.txt, subtask2_12.txt
Case Name Status Exec Time Memory
subtask0_sample_01.txt 6 ms 1508 KB
subtask0_sample_02.txt 1 ms 1596 KB
subtask0_sample_03.txt 1 ms 1504 KB
subtask0_sample_04.txt 1 ms 1544 KB
subtask0_sample_05.txt 2 ms 1600 KB
subtask1_01.txt 1 ms 1576 KB
subtask1_02.txt 1 ms 1580 KB
subtask1_03.txt 1 ms 1600 KB
subtask1_04.txt 1 ms 1580 KB
subtask1_05.txt 1 ms 1604 KB
subtask1_06.txt 1 ms 1644 KB
subtask1_07.txt 1 ms 1488 KB
subtask1_08.txt 1 ms 1556 KB
subtask1_09.txt 2 ms 1504 KB
subtask1_10.txt 1 ms 1516 KB
subtask1_11.txt 1 ms 1496 KB
subtask1_12.txt 1 ms 1500 KB
subtask1_13.txt 3 ms 1556 KB
subtask2_01.txt 1 ms 1512 KB
subtask2_02.txt 2 ms 1556 KB
subtask2_03.txt 1 ms 1512 KB
subtask2_04.txt 2 ms 1484 KB
subtask2_05.txt 3 ms 1596 KB
subtask2_06.txt 3 ms 1484 KB
subtask2_07.txt 2 ms 1504 KB
subtask2_08.txt 2 ms 1556 KB
subtask2_09.txt 2 ms 1544 KB
subtask2_10.txt 1 ms 1596 KB
subtask2_11.txt 1 ms 1576 KB
subtask2_12.txt 1 ms 1608 KB