結果

問題 No.632 穴埋め門松列
ユーザー ElkElk
提出日時 2018-05-29 16:27:37
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 638 bytes
コンパイル時間 180 ms
コンパイル使用メモリ 26,096 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-12 20:24:58
合計ジャッジ時間 653 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int main(){
    char num[3];
    int i, i_q;

    for(i = 0; i < 3; i++){
        scanf("%c ", &num[i]);
        if(num[i] == '?'){
            i_q = i;
            //printf("%d\n", i);
        }
    }
    //printf("%c %c %c\n", num[0], num[1], num[2]);
    if(i_q == 0){
        if(num[1] == '2'){
            printf("4\n");
        }else{
            printf("1\n");
        }
    }else if(i_q == 1){
        printf("14\n");
    }else if(i_q == 2){
        if(num[1] == '2'){
            printf("4\n");
        }else{
            printf("1\n");
        }
    }
    return 0;
}
0