結果

問題 No.3004 愛国心
ユーザー motimoti
提出日時 2015-12-23 23:41:59
言語 C90
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 89 bytes
コンパイル時間 171 ms
コンパイル使用メモリ 19,700 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-19 01:48:48
合計ジャッジ時間 1,358 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    1 | main() {
      | ^~~~
main.c: In function ‘main’:
main.c:3:9: warning: implicit declaration of function ‘getc’ [-Wimplicit-function-declaration]
    3 | while(c=getc()) {
      |         ^~~~
main.c:5:1: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
    5 | printf("%d\n", s[c-1-'0']);
      | ^~~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
  +++ |+#include <stdio.h>
    1 | main() {
main.c:5:1: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
    5 | printf("%d\n", s[c-1-'0']);
      | ^~~~~~
main.c:5:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’

ソースコード

diff #

main() {
int c;
while(c=getc()) {
char s[10]="yukicoder";
printf("%d\n", s[c-1-'0']);
}
}
0