結果

問題 No.485 方程式のお勉強
ユーザー akko_yukkyakko_yukky
提出日時 2017-03-08 17:12:33
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 457 bytes
コンパイル時間 3,186 ms
コンパイル使用メモリ 71,972 KB
実行使用メモリ 56,796 KB
最終ジャッジ日時 2023-09-06 00:04:16
合計ジャッジ時間 6,230 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,996 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 125 ms
55,832 KB
testcase_04 AC 125 ms
55,824 KB
testcase_05 AC 125 ms
55,648 KB
testcase_06 AC 125 ms
56,040 KB
testcase_07 WA -
testcase_08 AC 125 ms
56,796 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 123 ms
55,956 KB
testcase_12 AC 127 ms
55,852 KB
testcase_13 AC 124 ms
55,956 KB
testcase_14 WA -
testcase_15 AC 128 ms
55,844 KB
testcase_16 AC 126 ms
56,180 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class class_name {
    public static void main(String[] args){
        //System.out.println("Hello World!");
        
        int a;
        int b;
        
        Scanner sc = new Scanner(System.in);
        a = sc.nextInt();
        b = sc.nextInt();
            
        if (Math.abs(a)<=Math.abs(b) && a%b==0){
            System.out.println(b/a);
        }else{
            System.out.println("NO");
        }
    }
}
0