結果

問題 No.485 方程式のお勉強
ユーザー misk703misk703
提出日時 2018-04-27 12:57:30
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 410 bytes
コンパイル時間 3,360 ms
コンパイル使用メモリ 77,008 KB
実行使用メモリ 57,932 KB
最終ジャッジ日時 2023-09-10 06:07:07
合計ジャッジ時間 6,523 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 121 ms
55,664 KB
testcase_04 AC 121 ms
55,772 KB
testcase_05 AC 121 ms
55,608 KB
testcase_06 AC 122 ms
55,764 KB
testcase_07 WA -
testcase_08 AC 119 ms
55,808 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 121 ms
55,592 KB
testcase_12 WA -
testcase_13 AC 121 ms
55,552 KB
testcase_14 WA -
testcase_15 AC 120 ms
55,852 KB
testcase_16 AC 121 ms
57,932 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class A{
    public static void main(String[] args){
        Scanner s = new Scanner(System.in);
        int a = Integer.parseInt(s.next());
        double b = Integer.parseInt(s.next());
        double ans;

        ans = (double)a / b;

        if(ans % 1 ==0){
           System.out.println((int)ans);
        } else{
            System.out.println("NO");
        }
    }
}
0