結果

問題 No.441 和か積
ユーザー nenuonnenuon
提出日時 2017-07-01 15:03:44
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 998 bytes
コンパイル時間 740 ms
コンパイル使用メモリ 82,600 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-26 21:58:06
合計ジャッジ時間 2,177 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 AC 1 ms
4,376 KB
testcase_12 AC 2 ms
4,380 KB
testcase_13 AC 1 ms
4,380 KB
testcase_14 AC 2 ms
4,376 KB
testcase_15 AC 2 ms
4,376 KB
testcase_16 AC 1 ms
4,376 KB
testcase_17 AC 1 ms
4,376 KB
testcase_18 AC 2 ms
4,380 KB
testcase_19 AC 1 ms
4,376 KB
testcase_20 AC 2 ms
4,376 KB
testcase_21 AC 1 ms
4,380 KB
testcase_22 AC 2 ms
4,380 KB
testcase_23 AC 1 ms
4,380 KB
testcase_24 AC 1 ms
4,376 KB
testcase_25 AC 2 ms
4,380 KB
testcase_26 AC 1 ms
4,380 KB
testcase_27 AC 1 ms
4,380 KB
testcase_28 AC 2 ms
4,380 KB
testcase_29 AC 1 ms
4,376 KB
testcase_30 AC 2 ms
4,380 KB
testcase_31 AC 2 ms
4,376 KB
testcase_32 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
typedef long long ll;

int main(){
  string A, B;
  cin >> A >> B;
  int len_a = A.length();
  int len_b = B.length();
  if(len_a == 1 && len_b == 1){
    if((A[0]-'0') + (B[0]-'0') > (A[0]-'0') * (B[0]-'0')){
      cout << "S" << endl;
    }
    if((A[0]-'0') + (B[0]-'0') < (A[0]-'0') * (B[0]-'0')){
      cout << "P" << endl;
    }
    if((A[0]-'0') + (B[0]-'0') == (A[0]-'0') * (B[0]-'0')){
      cout << "E" << endl;
    }
  }
  else if(len_a == 1){
    if(A[0] == '0' || A[0] == '1'){
      cout << "S" << endl;
    }
  }
  else if(len_b == 1){
    if(B[0] == '0' || B[0] == '1'){
      cout << "S" << endl;
    }
  }
  else {
    cout << "P" << endl;
  }
  return 0;
}
0