結果
| 問題 | No.632 穴埋め門松列 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-04-30 17:30:48 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 110 bytes |
| 記録 | |
| コンパイル時間 | 93 ms |
| コンパイル使用メモリ | 27,136 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-27 23:55:49 |
| 合計ジャッジ時間 | 525 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 WA * 2 |
コンパイルメッセージ
main.c:1:1: warning: return type defaults to 'int' [-Wimplicit-int]
1 | main(){char s[6];int a;gets(s);s==63?a=s[2]==50?4:1:(a=s[2]==63?14:s[4]==63?a=s[2]==51?1:4:0);printf("%d",a);}
| ^~~~
main.c: In function 'main':
main.c:1:24: warning: implicit declaration of function 'gets' [-Wimplicit-function-declaration]
1 | main(){char s[6];int a;gets(s);s==63?a=s[2]==50?4:1:(a=s[2]==63?14:s[4]==63?a=s[2]==51?1:4:0);printf("%d",a);}
| ^~~~
main.c:1:33: warning: comparison between pointer and integer
1 | main(){char s[6];int a;gets(s);s==63?a=s[2]==50?4:1:(a=s[2]==63?14:s[4]==63?a=s[2]==51?1:4:0);printf("%d",a);}
| ^~
main.c:1:95: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | main(){char s[6];int a;gets(s);s==63?a=s[2]==50?4:1:(a=s[2]==63?14:s[4]==63?a=s[2]==51?1:4:0);printf("%d",a);}
| ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
+++ |+#include <stdio.h>
1 | main(){char s[6];int a;gets(s);s==63?a=s[2]==50?4:1:(a=s[2]==63?14:s[4]==63?a=s[2]==51?1:4:0);printf("%d",a);}
main.c:1:95: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
1 | main(){char s[6];int a;gets(s);s==63?a=s[2]==50?4:1:(a=s[2]==63?14:s[4]==63?a=s[2]==51?1:4:0);printf("%d",a);}
| ^~~~~~
main.c:1:95: note: include '<stdio.h>' or provide a declaration of 'printf'
/usr/bin/ld: /tmp/ccxQDeoO.o: in function `main':
main.c:(.text.startup+0x10): 警告: the `gets' function is dangerous and should not be used.
ソースコード
main(){char s[6];int a;gets(s);s==63?a=s[2]==50?4:1:(a=s[2]==63?14:s[4]==63?a=s[2]==51?1:4:0);printf("%d",a);}