結果

問題 No.836 じょうよ
ユーザー takeya_okinotakeya_okino
提出日時 2019-09-07 21:23:49
言語 Java19
(openjdk 21)
結果
AC  
実行時間 617 ms / 1,000 ms
コード長 442 bytes
コンパイル時間 2,033 ms
コンパイル使用メモリ 71,460 KB
実行使用メモリ 65,720 KB
最終ジャッジ日時 2023-09-09 11:58:20
合計ジャッジ時間 15,649 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 520 ms
64,380 KB
testcase_01 AC 131 ms
55,312 KB
testcase_02 AC 132 ms
56,208 KB
testcase_03 AC 128 ms
55,612 KB
testcase_04 AC 128 ms
55,564 KB
testcase_05 AC 133 ms
55,636 KB
testcase_06 AC 131 ms
55,692 KB
testcase_07 AC 127 ms
55,576 KB
testcase_08 AC 126 ms
55,564 KB
testcase_09 AC 127 ms
55,764 KB
testcase_10 AC 129 ms
55,172 KB
testcase_11 AC 239 ms
57,036 KB
testcase_12 AC 252 ms
57,112 KB
testcase_13 AC 231 ms
56,372 KB
testcase_14 AC 178 ms
55,628 KB
testcase_15 AC 243 ms
57,168 KB
testcase_16 AC 543 ms
61,928 KB
testcase_17 AC 507 ms
63,420 KB
testcase_18 AC 231 ms
56,104 KB
testcase_19 AC 271 ms
59,012 KB
testcase_20 AC 404 ms
61,748 KB
testcase_21 AC 180 ms
56,092 KB
testcase_22 AC 354 ms
63,144 KB
testcase_23 AC 542 ms
65,720 KB
testcase_24 AC 203 ms
55,640 KB
testcase_25 AC 312 ms
62,920 KB
testcase_26 AC 163 ms
53,780 KB
testcase_27 AC 174 ms
53,756 KB
testcase_28 AC 222 ms
55,480 KB
testcase_29 AC 196 ms
55,896 KB
testcase_30 AC 175 ms
55,648 KB
testcase_31 AC 242 ms
57,092 KB
testcase_32 AC 224 ms
57,132 KB
testcase_33 AC 181 ms
55,548 KB
testcase_34 AC 223 ms
57,492 KB
testcase_35 AC 230 ms
57,320 KB
testcase_36 AC 406 ms
61,372 KB
testcase_37 AC 393 ms
61,908 KB
testcase_38 AC 468 ms
61,312 KB
testcase_39 AC 436 ms
63,424 KB
testcase_40 AC 617 ms
63,896 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long l = sc.nextLong();
    long r = sc.nextLong();
    long n = sc.nextLong();
    long t1 = l % n;
    long t2 = r % n;
    long k = (r + n - 1 - t2 - l + t1 + 1) / n;
    for(int i = 0; i < n; i++) {
      long ans = k;
      if(i < t1) ans--;
      if(i > t2) ans--;
      System.out.println(ans);
    }
  }
}
0