結果
問題 |
No.632 穴埋め門松列
|
ユーザー |
![]() |
提出日時 | 2018-02-12 17:19:53 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 627 bytes |
コンパイル時間 | 262 ms |
コンパイル使用メモリ | 21,120 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-24 18:34:45 |
合計ジャッジ時間 | 776 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
コンパイルメッセージ
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; }