結果
| 問題 | No.441 和か積 |
| コンテスト | |
| ユーザー |
mmn15277198
|
| 提出日時 | 2020-09-11 05:42:03 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 997 bytes |
| 記録 | |
| コンパイル時間 | 660 ms |
| コンパイル使用メモリ | 104,868 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-30 10:16:02 |
| 合計ジャッジ時間 | 3,336 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 1 WA * 29 |
ソースコード
#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 = 'S';
cout << ans << endl;
return 0;
}
if(a == "0"){
if(b[0] == '-'){
ans = 'S';
}else{
ans = 'P';
}
cout << ans << endl;
return 0;
}
if(b == "0"){
if(a[0] == '-'){
ans = 'S';
}else{
ans = 'P';
}
cout << ans << endl;
return 0;
}
if(a == "1" || b == "1"){
ans = 'P';
cout << ans << endl;
return 0;
}
if((a[0] == '-' || b[0] == '-')){
ans = 'P';
cout << ans << endl;
return 0;
}
ans = 'S';
cout << ans << endl;
return 0;
}
mmn15277198