結果
| 問題 |
No.441 和か積
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-10-27 19:32:52 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 698 bytes |
| コンパイル時間 | 4,771 ms |
| コンパイル使用メモリ | 74,516 KB |
| 実行使用メモリ | 54,344 KB |
| 最終ジャッジ日時 | 2024-11-21 21:22:10 |
| 合計ジャッジ時間 | 10,316 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 WA * 1 |
ソースコード
import java.util.Scanner;
public class No441 {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
String a = s.next();
String b = s.next();
int aa = compareWithTwo(a);
int bb = compareWithTwo(b);
if (aa == 0 && bb == 0) {
System.out.println("E");
} else if (aa >= 0 && bb >= 0) {
System.out.println("P");
} else {
System.out.println("S");
}
}
private static int compareWithTwo(String str) {
if (str.length() == 1) {
int num = Integer.parseInt(str);
return Integer.compare(num, 2);
}
return 1;
}
}