結果

問題 No.532 Possible or Impossible
ユーザー takeya_okinotakeya_okino
提出日時 2017-06-23 22:43:11
言語 Java21
(openjdk 21)
結果
AC  
実行時間 142 ms / 2,000 ms
コード長 360 bytes
コンパイル時間 2,292 ms
コンパイル使用メモリ 74,288 KB
実行使用メモリ 54,484 KB
最終ジャッジ日時 2024-04-14 05:56:45
合計ジャッジ時間 6,683 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 142 ms
53,992 KB
testcase_01 AC 139 ms
53,948 KB
testcase_02 AC 139 ms
54,164 KB
testcase_03 AC 137 ms
54,028 KB
testcase_04 AC 138 ms
54,220 KB
testcase_05 AC 141 ms
54,196 KB
testcase_06 AC 139 ms
54,124 KB
testcase_07 AC 138 ms
54,032 KB
testcase_08 AC 138 ms
54,112 KB
testcase_09 AC 137 ms
54,108 KB
testcase_10 AC 136 ms
54,008 KB
testcase_11 AC 137 ms
54,380 KB
testcase_12 AC 137 ms
54,208 KB
testcase_13 AC 137 ms
53,940 KB
testcase_14 AC 137 ms
54,484 KB
testcase_15 AC 134 ms
53,960 KB
testcase_16 AC 138 ms
54,076 KB
testcase_17 AC 136 ms
54,180 KB
testcase_18 AC 138 ms
53,984 KB
testcase_19 AC 135 ms
54,160 KB
testcase_20 AC 136 ms
54,104 KB
testcase_21 AC 136 ms
54,112 KB
testcase_22 AC 138 ms
53,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M = sc.nextInt();
    String ans = "Possible";
    if(N == 1) {
      if(M == 0) ans = "Impossible";
    }
    if(N == 2) {
      if(M == 0) ans = "Impossible";
    }
    System.out.println(ans);
  }
}
0