結果
| 問題 | No.441 和か積 | 
| コンテスト | |
| ユーザー |  AQUA16573837 | 
| 提出日時 | 2018-04-06 03:39:47 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 621 bytes | 
| コンパイル時間 | 674 ms | 
| コンパイル使用メモリ | 60,116 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-06-27 03:59:02 | 
| 合計ジャッジ時間 | 1,356 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 30 | 
コンパイルメッセージ
main.cpp: In function ‘void solve()’:
main.cpp:21:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   21 |         scanf("%s %s", A, B);
      |         ~~~~~^~~~~~~~~~~~~~~
            
            ソースコード
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <deque>
#include <string>
#include <iostream>
using namespace std;
using ll = long long;
void solve();
int main() {
	solve();
#ifdef DBG
	while (true);
#endif
}
//441
void solve() {
	char A[202], B[202];
	scanf("%s %s", A, B);
	if (A[0] == '0' && A[1] == 0 && B[0] == '0' && B[1] == 0) {
		printf("E\n");
		return;
	}
	if (A[0] == '2' && A[1] == 0 && B[0] == '2' && B[1] == 0) {
		printf("E\n");
		return;
	}
	if (('0' <= A[0] && A[0] <= '1' && A[1] == 0) |
		('0' <= B[0] && B[0] <= '1' && B[1] == 0)) {
		printf("S\n");
		return;
	}
	printf("P\n");
}
            
            
            
        