結果

問題 No.337 P versus NP
ユーザー tsunabittsunabit
提出日時 2018-05-27 20:00:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 745 bytes
コンパイル時間 3,315 ms
コンパイル使用メモリ 72,944 KB
実行使用メモリ 56,196 KB
最終ジャッジ日時 2023-09-11 04:44:14
合計ジャッジ時間 7,541 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,852 KB
testcase_01 AC 123 ms
55,716 KB
testcase_02 AC 125 ms
55,892 KB
testcase_03 AC 126 ms
55,696 KB
testcase_04 AC 126 ms
55,960 KB
testcase_05 AC 125 ms
55,596 KB
testcase_06 AC 128 ms
55,860 KB
testcase_07 AC 126 ms
56,120 KB
testcase_08 AC 124 ms
56,068 KB
testcase_09 AC 125 ms
56,084 KB
testcase_10 AC 123 ms
55,748 KB
testcase_11 AC 127 ms
56,196 KB
testcase_12 AC 125 ms
55,676 KB
testcase_13 AC 128 ms
55,628 KB
testcase_14 AC 124 ms
55,908 KB
testcase_15 AC 125 ms
55,880 KB
testcase_16 AC 124 ms
55,740 KB
testcase_17 AC 127 ms
55,980 KB
testcase_18 AC 128 ms
55,612 KB
testcase_19 AC 125 ms
55,600 KB
testcase_20 AC 125 ms
55,980 KB
testcase_21 AC 126 ms
55,612 KB
testcase_22 AC 127 ms
55,860 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.util.stream.Stream;

// ***問題文***
//整数 N,P が与えられます. P=NP か P≠NP かを判定するプログラムを書いてください. 
// ***入力***
// N P
// 入力は以下の制約を満たします.
// N,Pはともに整数
// −50≤N≤50
// −50≤P≤50
// ***出力***
// P=NP なら =,P≠NP なら != と 1 行で出力し, 最後に改行を出力してください. 

public class No337 {
    public static void main(String[] args) {
        // 標準入力から読み込む際に、Scannerオブジェクトを使う。
        Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int p = sc.nextInt();
		System.out.println(p == n * p ? "=" : "!=");
	}
}
0