結果

問題 No.485 方程式のお勉強
ユーザー KibidanKibidan
提出日時 2017-02-24 22:24:48
言語 Java19
(openjdk 21)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 368 bytes
コンパイル時間 4,336 ms
コンパイル使用メモリ 71,988 KB
実行使用メモリ 56,036 KB
最終ジャッジ日時 2023-07-27 10:20:36
合計ジャッジ時間 7,497 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
56,028 KB
testcase_01 AC 120 ms
55,548 KB
testcase_02 AC 121 ms
56,036 KB
testcase_03 AC 120 ms
55,892 KB
testcase_04 AC 118 ms
55,888 KB
testcase_05 AC 121 ms
55,656 KB
testcase_06 AC 121 ms
55,784 KB
testcase_07 AC 120 ms
55,716 KB
testcase_08 AC 118 ms
55,984 KB
testcase_09 AC 120 ms
55,884 KB
testcase_10 AC 121 ms
55,460 KB
testcase_11 AC 121 ms
55,864 KB
testcase_12 AC 121 ms
55,688 KB
testcase_13 AC 120 ms
55,836 KB
testcase_14 AC 120 ms
55,884 KB
testcase_15 AC 121 ms
55,996 KB
testcase_16 AC 120 ms
55,704 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());

        if((double)b/(double)a-b/a==0){
            System.out.println(b/a);
        }else{
            System.out.println("NO");
        }
    }
}
0