結果
問題 |
No.441 和か積
|
ユーザー |
![]() |
提出日時 | 2018-03-03 18:22:48 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 1,000 ms |
コード長 | 699 bytes |
コンパイル時間 | 646 ms |
コンパイル使用メモリ | 65,132 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 03:58:13 |
合計ジャッジ時間 | 1,583 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 |
ソースコード
// No.441 和か積 // https://yukicoder.me/problems/no/441 // #include <iostream> using namespace std; char solve(double A, double B); int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); double A, B; cin >> A >> B; char ans = solve(A, B); cout << ans << endl; } char solve(double A, double B) { if (A == 0.0) { if (B == 0.0) return 'E'; else return 'S'; } else { if (B == 0.0) return 'S'; else { if (A == 2.0 && B == 2.0) return 'E'; else if (A == 1.0 || B == 1.0) return 'S'; return 'P'; } } }