結果
| 問題 | 
                            No.257 N言っちゃダメゲーム (3)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             byakko0514
                         | 
                    
| 提出日時 | 2015-08-01 17:31:59 | 
| 言語 | Java  (openjdk 23)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                            (最新)
                                AC
                                 
                             
                            (最初)
                            
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 412 bytes | 
| コンパイル時間 | 2,108 ms | 
| コンパイル使用メモリ | 73,988 KB | 
| 実行使用メモリ | 72,856 KB | 
| 平均クエリ数 | 7.47 | 
| 最終ジャッジ日時 | 2024-07-16 05:28:56 | 
| 合計ジャッジ時間 | 8,878 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 3 WA * 27 | 
ソースコード
import java.util.Scanner;
class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		int x = (N-1)%(K+1);
		int y = 0;
		System.out.println(x);
		while(true){
			y++;
			if(y == 5){
				System.out.println(N);
				break;
			}
			x += K;
			System.out.println(x);
			if(x > N)break;
			x += 1;
			System.out.println(x);
		}
		}
	}
            
            
            
        
            
byakko0514