結果

問題 No.337 P versus NP
ユーザー shoootshooot
提出日時 2017-12-12 17:45:29
言語 Java19
(openjdk 21)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 403 bytes
コンパイル時間 3,107 ms
コンパイル使用メモリ 72,052 KB
実行使用メモリ 56,468 KB
最終ジャッジ日時 2023-08-20 23:11:23
合計ジャッジ時間 7,237 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,552 KB
testcase_01 AC 120 ms
56,176 KB
testcase_02 AC 122 ms
55,580 KB
testcase_03 AC 119 ms
55,780 KB
testcase_04 AC 118 ms
55,800 KB
testcase_05 AC 120 ms
56,188 KB
testcase_06 AC 119 ms
56,228 KB
testcase_07 AC 119 ms
56,408 KB
testcase_08 AC 120 ms
56,348 KB
testcase_09 AC 120 ms
56,332 KB
testcase_10 AC 122 ms
56,208 KB
testcase_11 AC 121 ms
55,536 KB
testcase_12 AC 122 ms
55,828 KB
testcase_13 AC 118 ms
56,292 KB
testcase_14 AC 119 ms
56,252 KB
testcase_15 AC 118 ms
56,204 KB
testcase_16 AC 119 ms
56,300 KB
testcase_17 AC 122 ms
55,648 KB
testcase_18 AC 120 ms
55,688 KB
testcase_19 AC 119 ms
55,592 KB
testcase_20 AC 119 ms
56,468 KB
testcase_21 AC 121 ms
56,124 KB
testcase_22 AC 118 ms
56,140 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class NP {
    public static void main(String[] args){
        Scanner stdIn = new Scanner(System.in);

        //System.out.print("n:");
        int n = stdIn.nextInt();

        //System.out.print("p:");
        int p = stdIn.nextInt();

        if(p == n*p)
            System.out.println("=");
        else if(p != n*p)
            System.out.println("!=");
    }
}
0