結果

問題 No.531 エヌスクミ島の平和協定
ユーザー syuki791syuki791
提出日時 2017-07-08 20:36:36
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 408 bytes
コンパイル時間 2,410 ms
コンパイル使用メモリ 78,380 KB
実行使用メモリ 41,852 KB
最終ジャッジ日時 2024-04-16 06:30:31
合計ジャッジ時間 8,179 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
40,976 KB
testcase_01 AC 126 ms
40,912 KB
testcase_02 AC 130 ms
41,316 KB
testcase_03 AC 131 ms
40,824 KB
testcase_04 AC 127 ms
40,960 KB
testcase_05 AC 125 ms
41,100 KB
testcase_06 AC 114 ms
40,244 KB
testcase_07 AC 129 ms
41,092 KB
testcase_08 WA -
testcase_09 AC 128 ms
41,428 KB
testcase_10 AC 127 ms
41,124 KB
testcase_11 AC 127 ms
41,108 KB
testcase_12 AC 127 ms
41,108 KB
testcase_13 AC 134 ms
40,960 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 130 ms
41,260 KB
testcase_17 AC 133 ms
41,156 KB
testcase_18 AC 126 ms
41,172 KB
testcase_19 AC 130 ms
40,932 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 125 ms
40,964 KB
testcase_23 AC 129 ms
40,852 KB
testcase_24 AC 128 ms
41,108 KB
testcase_25 AC 131 ms
41,036 KB
testcase_26 AC 127 ms
40,864 KB
testcase_27 AC 125 ms
40,884 KB
testcase_28 AC 128 ms
41,108 KB
testcase_29 AC 129 ms
41,520 KB
testcase_30 AC 121 ms
40,128 KB
testcase_31 AC 130 ms
41,188 KB
testcase_32 AC 128 ms
41,148 KB
testcase_33 WA -
testcase_34 AC 126 ms
41,328 KB
testcase_35 AC 126 ms
41,092 KB
testcase_36 AC 125 ms
40,908 KB
testcase_37 AC 129 ms
41,188 KB
testcase_38 AC 135 ms
40,960 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


import java.util.Scanner;

public class Main{
	
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		
		String[] str = s.nextLine().split(" ");
		int n = Integer.parseInt(str[0]);
		int m =Integer.parseInt(str[1]);
		
		if(m>=n){
			System.out.println(1);
					
		}else{
			if(n%m==0){
				System.out.println(n/m);
			}else{
			
			System.out.println(-1);
			}
		}
		
		
	}

}
0