結果
| 問題 |
No.441 和か積
|
| コンテスト | |
| ユーザー |
mmn15277198
|
| 提出日時 | 2020-09-11 05:43:49 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 1,000 ms |
| コード長 | 999 bytes |
| コンパイル時間 | 886 ms |
| コンパイル使用メモリ | 90,952 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-24 14:37:52 |
| 合計ジャッジ時間 | 1,992 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
#include<iostream>
#include<stdio.h>
#include<stdlib.h>
#include<algorithm>
#include<vector>
#include<string.h>
#include<math.h>
#include<map>
#include<iomanip>
#include<queue>
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
string a, b;
cin >> a >> b;
char ans;
if(a == "0" && b == "0"){
ans = 'E';
cout << ans << endl;
return 0;
}
if(a == "2" && b == "2"){
ans = 'E';
cout << ans << endl;
return 0;
}
if((a[0] == '-' && b[0] == '-')){
ans = 'P';
cout << ans << endl;
return 0;
}
if(a == "0"){
if(b[0] == '-'){
ans = 'P';
}else{
ans = 'S';
}
cout << ans << endl;
return 0;
}
if(b == "0"){
if(a[0] == '-'){
ans = 'P';
}else{
ans = 'S';
}
cout << ans << endl;
return 0;
}
if(a == "1" || b == "1"){
ans = 'S';
cout << ans << endl;
return 0;
}
if((a[0] == '-' || b[0] == '-')){
ans = 'S';
cout << ans << endl;
return 0;
}
ans = 'P';
cout << ans << endl;
return 0;
}
mmn15277198