結果
問題 | No.495 (^^*) Easy |
ユーザー | 👑 testestest |
提出日時 | 2017-07-29 02:45:36 |
言語 | C (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 87 bytes |
コンパイル時間 | 275 ms |
コンパイル使用メモリ | 27,904 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-10 20:27:04 |
合計ジャッジ時間 | 715 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
6,816 KB |
testcase_01 | AC | 1 ms
6,816 KB |
testcase_02 | AC | 1 ms
6,820 KB |
testcase_03 | AC | 1 ms
6,816 KB |
testcase_04 | AC | 1 ms
6,820 KB |
testcase_05 | AC | 1 ms
6,820 KB |
testcase_06 | AC | 1 ms
6,820 KB |
コンパイルメッセージ
main.c:1:15: warning: data definition has no type or storage class 1 | char s[1<<17];l,S;main(i){for(gets(s);s[i];i+=5)l+=s[i]==94,S++;printf("%d %d",l,S-l);} | ^ main.c:1:15: warning: type defaults to 'int' in declaration of 'l' [-Wimplicit-int] main.c:1:17: warning: type defaults to 'int' in declaration of 'S' [-Wimplicit-int] 1 | char s[1<<17];l,S;main(i){for(gets(s);s[i];i+=5)l+=s[i]==94,S++;printf("%d %d",l,S-l);} | ^ main.c:1:19: warning: return type defaults to 'int' [-Wimplicit-int] 1 | char s[1<<17];l,S;main(i){for(gets(s);s[i];i+=5)l+=s[i]==94,S++;printf("%d %d",l,S-l);} | ^~~~ main.c: In function 'main': main.c:1:19: warning: type of 'i' defaults to 'int' [-Wimplicit-int] main.c:1:31: warning: implicit declaration of function 'gets' [-Wimplicit-function-declaration] 1 | char s[1<<17];l,S;main(i){for(gets(s);s[i];i+=5)l+=s[i]==94,S++;printf("%d %d",l,S-l);} | ^~~~ main.c:1:65: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 1 | char s[1<<17];l,S;main(i){for(gets(s);s[i];i+=5)l+=s[i]==94,S++;printf("%d %d",l,S-l);} | ^~~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf' +++ |+#include <stdio.h> 1 | char s[1<<17];l,S;main(i){for(gets(s);s[i];i+=5)l+=s[i]==94,S++;printf("%d %d",l,S-l);} main.c:1:65: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] 1 | char s[1<<17];l,S;main(i){for(gets(s);s[i];i+=5)l+=s[i]==94,S++;printf("%d %d",l,S-l);} | ^~~~~~ main.c:1:65: note: include '<stdio.h>' or provide a declaration of 'printf' /usr/bin/ld: /tmp/ccTc7Qch.o: in function `main': main.c:(.text.startup+0x15): 警告: the `gets' function is dangerous and should not be used.
ソースコード
char s[1<<17];l,S;main(i){for(gets(s);s[i];i+=5)l+=s[i]==94,S++;printf("%d %d",l,S-l);}