結果
問題 | No.441 和か積 |
ユーザー |
![]() |
提出日時 | 2018-09-27 01:08:53 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 547 bytes |
コンパイル時間 | 97 ms |
コンパイル使用メモリ | 28,160 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-12 04:24:00 |
合計ジャッジ時間 | 866 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 |
ソースコード
#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,"0") == 0)||(strcmp(B,"0") == 0)||(strcmp(A,"1") == 0)||(strcmp(B,"1") == 0)){ printf("S\n"); }else{ printf("P\n"); } return 0; }