結果
| 問題 | 
                            No.531 エヌスクミ島の平和協定
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2017-07-08 20:54:46 | 
| 言語 | Java  (openjdk 23)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 412 bytes | 
| コンパイル時間 | 2,553 ms | 
| コンパイル使用メモリ | 74,380 KB | 
| 実行使用メモリ | 54,384 KB | 
| 最終ジャッジ日時 | 2024-10-06 20:02:20 | 
| 合計ジャッジ時間 | 8,397 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 33 WA * 4 | 
ソースコード
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>=m){
				System.out.println(n/m);
			}else {
			
			System.out.println(-1);
			
		}
		
		
	}
}
	
}