結果

問題 No.441 和か積
ユーザー pengin_2000pengin_2000
提出日時 2020-02-21 18:43:18
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 493 bytes
コンパイル時間 122 ms
コンパイル使用メモリ 29,312 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-17 06:49:14
合計ジャッジ時間 997 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<stdio.h>
#include<string.h>
int main()
{
	char a[202], b[202];
	scanf("%s%s", a, b);
	if (strlen(a) > 1)
	{
		if (strlen(b) > 1)
			printf("P\n");
		else if (b[0] > '1')
			printf("P\n");
		else
			printf("S\nS");
	}
	else if (strlen(b) > 1)
	{
		if (b[0] > '1')
			printf("P\n");
		else
			printf("S\n");
	}
	else
	{
		int x = a[0] - '0';
		int y = b[0] - '0';
		if (x + y > x* y)
			printf("S\n");
		else if (x + y < x * y)
			printf("P\n");
		else
			printf("E\n");
	}
	return 0;
}
0