結果
| 問題 | No.441 和か積 |
| コンテスト | |
| ユーザー |
kyuridenamida
|
| 提出日時 | 2016-11-11 22:22:07 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 406 bytes |
| 記録 | |
| コンパイル時間 | 1,036 ms |
| コンパイル使用メモリ | 175,280 KB |
| 実行使用メモリ | 6,144 KB |
| 最終ジャッジ日時 | 2026-03-14 07:04:57 |
| 合計ジャッジ時間 | 2,015 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
long long f(string s){
long long x = 0;
for(int i = 0 ; i < s.size() ; i++){
x = x * 10 + s[i] - '0';
if( x >= 10 ) return x;
}
return x;
}
int main(){
string A,B;
cin >> A >> B;
long long a = f(A);
long long b = f(B);
if( a + b < a*b ){
cout << "P" << endl;
}else if( a + b > a*b ){
cout << "S" << endl;
}else{
cout << "E" << endl;
}
}
kyuridenamida