結果
問題 |
No.138 化石のバージョン
|
ユーザー |
![]() |
提出日時 | 2025-03-10 11:40:48 |
言語 | C (gcc 13.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 271 bytes |
コンパイル時間 | 390 ms |
コンパイル使用メモリ | 22,784 KB |
実行使用メモリ | 7,328 KB |
最終ジャッジ日時 | 2025-03-10 11:40:54 |
合計ジャッジ時間 | 5,489 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 33 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:4:17: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘int’ [-Wformat=] 4 | scanf("%d.%d.%d",previousA,previousB,previousC); | ~^ ~~~~~~~~~ | | | | int * int main.c:4:20: warning: format ‘%d’ expects argument of type ‘int *’, but argument 3 has type ‘int’ [-Wformat=] 4 | scanf("%d.%d.%d",previousA,previousB,previousC); | ~^ ~~~~~~~~~ | | | | int * int main.c:4:23: warning: format ‘%d’ expects argument of type ‘int *’, but argument 4 has type ‘int’ [-Wformat=] 4 | scanf("%d.%d.%d",previousA,previousB,previousC); | ~^ ~~~~~~~~~ | | | | int * int main.c:6:17: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘int’ [-Wformat=] 6 | scanf("%d.%d.%d",newA,newB,newC); | ~^ ~~~~ | | | | int * int main.c:6:20: warning: format ‘%d’ expects argument of type ‘int *’, but argument 3 has type ‘int’ [-Wformat=] 6 | scanf("%d.%d.%d",newA,newB,newC); | ~^ ~~~~ | | | | int * int main.c:6:23: warning: format ‘%d’ expects argument of type ‘int *’, but argument 4 has type ‘int’ [-Wformat=] 6 | scanf("%d.%d.%d",newA,newB,newC); | ~^ ~~~~ | | | | int * int main.c:4:9: warning: ignoring return value of ‘scanf’ declared with attribute
ソースコード
#include <stdio.h> void main(void){ int previousA = 0,previousB = 0,previousC = 0; scanf("%d.%d.%d",previousA,previousB,previousC); int newA = 0,newB = 0,newC = 0; scanf("%d.%d.%d",newA,newB,newC); if(previousA == newA){ printf("YES"); }else{ printf("NO"); } }