結果
問題 |
No.632 穴埋め門松列
|
ユーザー |
![]() |
提出日時 | 2018-02-12 17:18:47 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 625 bytes |
コンパイル時間 | 270 ms |
コンパイル使用メモリ | 20,864 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-24 18:30:38 |
合計ジャッジ時間 | 873 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 WA * 1 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:8:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%c%*c%c%*c%c",&a[0],&a[1],&a[2]); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <string.h> int main(){ char a[3]; int i; int x; scanf("%c%*c%c%*c%c",&a[0],&a[1],&a[2]); for(i=0;i<3;i++){ if(a[i]=='?'){ // printf("!\n"); switch(i){ case 0: if(a[1]=='3'){ printf("1\n");; } if(a[1]=='2'){ printf("4\n");; } break; case 1: printf("14\n"); break; case 2: if(a[1]==3){ printf("1\n");; } if(a[1]=='2'){ printf("4\n");; } break; } } } return 0; }