結果

問題 No.441 和か積
ユーザー monburan_0401
提出日時 2018-09-27 01:02:45
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 499 bytes
コンパイル時間 141 ms
コンパイル使用メモリ 27,264 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-12 04:23:57
合計ジャッジ時間 1,408 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <string.h>
int main(void){
    char A[201];
    char B[201];

    scanf("%s %s",A,B);

    //  If A or B is "1" or "0", the answer is "S"
    //  If A and B is "2", the answer is "E"
    //  else the answer is "P"

    if((strcmp(A,"1") == 0)||(strcmp(B,"0") == 0)||(strcmp(A,"1") == 0)||(strcmp(B,"1") == 0)){
        printf("S\n");
    }else if((strcmp(A,"2") == 0)&&(strcmp(B,"2") == 0)){
        printf("E\n");
    }else{
        printf("P\n");
    }

    return 0;
}
0