結果

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

ソースコード

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,"2") == 0)&&(strcmp(B,"2") == 0))||((strcmp(A,"0") == 0)&&(strcmp(B,"0") == 0))){
        printf("E\n");
    }else if((strcmp(A,"1") == 0)||(strcmp(B,"0") == 0)||(strcmp(A,"1") == 0)||(strcmp(B,"1") == 0)){
        printf("S\n");
    }else{
        printf("P\n");
    }

    return 0;
}
0