結果
| 問題 |
No.441 和か積
|
| コンテスト | |
| ユーザー |
alpha_virginis
|
| 提出日時 | 2016-11-14 01:02:43 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 731 bytes |
| コンパイル時間 | 1,573 ms |
| コンパイル使用メモリ | 166,716 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-27 03:34:15 |
| 合計ジャッジ時間 | 2,382 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
#include <bits/stdc++.h>
char xs[256];
char ys[256];
int main() {
scanf("%s %s", xs, ys);
bool xIsZero = strcmp(xs, "0") == 0 and strlen(xs) == 1;
bool xIsOne = strcmp(xs, "1") == 0 and strlen(xs) == 1;
bool xIsTwo = strcmp(xs, "2") == 0 and strlen(xs) == 1;
bool yIsZero = strcmp(ys, "0") == 0 and strlen(ys) == 1;
bool yIsOne = strcmp(ys, "1") == 0 and strlen(ys) == 1;
bool yIsTwo = strcmp(ys, "2") == 0 and strlen(ys) == 1;
if( xIsZero and yIsZero ) {
puts("E"); return 0;
}
if( xIsZero or yIsZero ) {
puts("S"); return 0;
}
if( xIsOne or yIsOne ) {
puts("S"); return 0;
}
if( xIsTwo and yIsTwo ) {
puts("E"); return 0;
}
puts("P"); return 0;
return 0;
}
alpha_virginis