結果

問題 No.836 じょうよ
ユーザー ks2mks2m
提出日時 2019-06-14 22:01:24
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 531 bytes
コンパイル時間 2,517 ms
コンパイル使用メモリ 76,240 KB
実行使用メモリ 57,140 KB
最終ジャッジ日時 2024-04-26 16:34:58
合計ジャッジ時間 11,274 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 245 ms
57,008 KB
testcase_01 AC 136 ms
54,164 KB
testcase_02 AC 133 ms
54,272 KB
testcase_03 WA -
testcase_04 AC 134 ms
53,916 KB
testcase_05 AC 135 ms
53,836 KB
testcase_06 WA -
testcase_07 AC 136 ms
53,632 KB
testcase_08 WA -
testcase_09 AC 134 ms
54,292 KB
testcase_10 AC 136 ms
53,712 KB
testcase_11 AC 167 ms
54,072 KB
testcase_12 AC 180 ms
54,008 KB
testcase_13 AC 177 ms
54,248 KB
testcase_14 AC 146 ms
53,316 KB
testcase_15 AC 167 ms
54,244 KB
testcase_16 AC 245 ms
57,140 KB
testcase_17 WA -
testcase_18 AC 185 ms
54,652 KB
testcase_19 WA -
testcase_20 AC 217 ms
56,312 KB
testcase_21 AC 158 ms
54,364 KB
testcase_22 AC 199 ms
56,388 KB
testcase_23 AC 220 ms
57,088 KB
testcase_24 AC 175 ms
54,180 KB
testcase_25 AC 198 ms
56,116 KB
testcase_26 AC 157 ms
54,100 KB
testcase_27 AC 159 ms
53,960 KB
testcase_28 AC 182 ms
54,160 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 202 ms
56,724 KB
testcase_37 AC 210 ms
56,584 KB
testcase_38 AC 223 ms
56,676 KB
testcase_39 AC 209 ms
56,652 KB
testcase_40 AC 242 ms
57,048 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.PrintWriter;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		long l = sc.nextLong();
		long r = sc.nextLong();
		long n = sc.nextLong();
		sc.close();

		long a = l % n;
		long b = r % n;
		long c = (r - l) / n;
		PrintWriter pw = new PrintWriter(System.out);
		for (int i = 0; i < n; i++) {
			long ans = c;
			if (i >= a) {
				ans++;
			}
			if (i > b) {
				ans--;
			}
			pw.println(ans);
		}
		pw.flush();
	}
}
0