結果

問題 No.836 じょうよ
ユーザー ks2mks2m
提出日時 2019-06-14 22:07:11
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 651 bytes
コンパイル時間 2,014 ms
コンパイル使用メモリ 75,076 KB
実行使用メモリ 46,024 KB
最終ジャッジ日時 2024-04-26 16:48:42
合計ジャッジ時間 10,812 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 237 ms
45,456 KB
testcase_01 AC 130 ms
41,260 KB
testcase_02 AC 131 ms
41,660 KB
testcase_03 AC 129 ms
41,120 KB
testcase_04 AC 126 ms
41,300 KB
testcase_05 AC 128 ms
41,104 KB
testcase_06 AC 114 ms
40,364 KB
testcase_07 WA -
testcase_08 AC 129 ms
41,420 KB
testcase_09 AC 131 ms
41,548 KB
testcase_10 WA -
testcase_11 AC 171 ms
42,028 KB
testcase_12 AC 169 ms
42,168 KB
testcase_13 AC 170 ms
41,944 KB
testcase_14 AC 143 ms
41,244 KB
testcase_15 AC 174 ms
41,704 KB
testcase_16 AC 242 ms
45,276 KB
testcase_17 AC 231 ms
46,024 KB
testcase_18 AC 163 ms
42,028 KB
testcase_19 AC 185 ms
41,988 KB
testcase_20 AC 207 ms
43,772 KB
testcase_21 AC 144 ms
41,532 KB
testcase_22 AC 192 ms
43,424 KB
testcase_23 AC 223 ms
45,928 KB
testcase_24 AC 159 ms
41,404 KB
testcase_25 AC 173 ms
42,648 KB
testcase_26 AC 136 ms
40,148 KB
testcase_27 AC 138 ms
40,612 KB
testcase_28 AC 153 ms
41,620 KB
testcase_29 AC 150 ms
41,440 KB
testcase_30 AC 138 ms
40,596 KB
testcase_31 AC 171 ms
42,216 KB
testcase_32 AC 171 ms
41,784 KB
testcase_33 AC 148 ms
41,308 KB
testcase_34 AC 170 ms
41,740 KB
testcase_35 AC 173 ms
42,068 KB
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
権限があれば一括ダウンロードができます

ソースコード

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 (a < b) {
				if (i >= a) {
					ans++;
				}
				if (i > b) {
					ans--;
				}
			}
			if (a > b) {
				if (i <= b) {
					ans++;
				}
				if (i >= a) {
					ans++;
				}
			}
			pw.println(ans);
		}
		pw.flush();
	}
}
0