結果

問題 No.485 方程式のお勉強
ユーザー akko_yukkyakko_yukky
提出日時 2017-03-08 17:16:32
言語 Java21
(openjdk 21)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 457 bytes
コンパイル時間 4,109 ms
コンパイル使用メモリ 75,520 KB
実行使用メモリ 54,664 KB
最終ジャッジ日時 2024-04-14 23:12:24
合計ジャッジ時間 6,821 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
54,040 KB
testcase_01 AC 129 ms
54,004 KB
testcase_02 AC 129 ms
54,256 KB
testcase_03 AC 129 ms
54,044 KB
testcase_04 AC 130 ms
54,300 KB
testcase_05 AC 131 ms
54,664 KB
testcase_06 AC 117 ms
53,016 KB
testcase_07 AC 130 ms
54,232 KB
testcase_08 AC 129 ms
54,044 KB
testcase_09 AC 130 ms
54,016 KB
testcase_10 AC 129 ms
54,380 KB
testcase_11 AC 130 ms
54,164 KB
testcase_12 AC 132 ms
53,892 KB
testcase_13 AC 128 ms
53,924 KB
testcase_14 AC 131 ms
54,300 KB
testcase_15 AC 131 ms
53,952 KB
testcase_16 AC 131 ms
54,140 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) && b%a==0){
            System.out.println(b/a);
        }else{
            System.out.println("NO");
        }
    }
}
0