結果

問題 No.257 N言っちゃダメゲーム (3)
ユーザー kou6839kou6839
提出日時 2015-08-04 12:23:06
言語 Java21
(openjdk 21)
結果
AC  
実行時間 171 ms / 2,000 ms
コード長 412 bytes
コンパイル時間 2,186 ms
コンパイル使用メモリ 74,516 KB
実行使用メモリ 72,336 KB
平均クエリ数 3.70
最終ジャッジ日時 2023-09-23 21:19:07
合計ジャッジ時間 8,934 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 165 ms
72,024 KB
testcase_01 AC 156 ms
71,484 KB
testcase_02 AC 158 ms
71,884 KB
testcase_03 AC 165 ms
71,728 KB
testcase_04 AC 165 ms
71,344 KB
testcase_05 AC 157 ms
72,000 KB
testcase_06 AC 162 ms
71,052 KB
testcase_07 AC 161 ms
72,208 KB
testcase_08 AC 162 ms
71,908 KB
testcase_09 AC 161 ms
71,916 KB
testcase_10 AC 163 ms
71,780 KB
testcase_11 AC 162 ms
71,856 KB
testcase_12 AC 167 ms
71,208 KB
testcase_13 AC 164 ms
72,000 KB
testcase_14 AC 159 ms
71,948 KB
testcase_15 AC 164 ms
71,744 KB
testcase_16 AC 164 ms
72,336 KB
testcase_17 AC 171 ms
71,260 KB
testcase_18 AC 166 ms
71,980 KB
testcase_19 AC 165 ms
71,664 KB
testcase_20 AC 167 ms
71,512 KB
testcase_21 AC 167 ms
72,048 KB
testcase_22 AC 170 ms
71,696 KB
testcase_23 AC 165 ms
71,448 KB
testcase_24 AC 169 ms
71,920 KB
testcase_25 AC 170 ms
72,092 KB
testcase_26 AC 168 ms
71,796 KB
testcase_27 AC 169 ms
71,800 KB
testcase_28 AC 169 ms
72,036 KB
testcase_29 AC 164 ms
71,896 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.net.NetworkInterface;
import java.util.*;

import javax.swing.event.AncestorEvent;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		int now = (n-1)%(k+1);
		System.out.println( now );
		
		while(true){
			int a = sc.nextInt();
			if(a>=n) break;
			now+=k+1;
			System.out.println(now);
		}
	}
}
0