結果

問題 No.836 じょうよ
ユーザー tentententen
提出日時 2020-09-01 01:43:18
言語 Java21
(openjdk 21)
結果
AC  
実行時間 194 ms / 1,000 ms
コード長 692 bytes
コンパイル時間 1,925 ms
コンパイル使用メモリ 74,560 KB
実行使用メモリ 46,108 KB
最終ジャッジ日時 2024-04-28 11:46:26
合計ジャッジ時間 9,120 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 193 ms
45,804 KB
testcase_01 AC 110 ms
41,240 KB
testcase_02 AC 113 ms
40,096 KB
testcase_03 AC 105 ms
39,820 KB
testcase_04 AC 111 ms
41,140 KB
testcase_05 AC 99 ms
40,224 KB
testcase_06 AC 115 ms
41,140 KB
testcase_07 AC 112 ms
39,844 KB
testcase_08 AC 110 ms
41,260 KB
testcase_09 AC 107 ms
40,856 KB
testcase_10 AC 110 ms
39,964 KB
testcase_11 AC 135 ms
41,052 KB
testcase_12 AC 141 ms
41,344 KB
testcase_13 AC 123 ms
41,396 KB
testcase_14 AC 103 ms
39,844 KB
testcase_15 AC 134 ms
41,144 KB
testcase_16 AC 194 ms
46,108 KB
testcase_17 AC 194 ms
45,844 KB
testcase_18 AC 125 ms
40,572 KB
testcase_19 AC 148 ms
42,080 KB
testcase_20 AC 175 ms
44,044 KB
testcase_21 AC 99 ms
40,268 KB
testcase_22 AC 121 ms
41,408 KB
testcase_23 AC 162 ms
42,556 KB
testcase_24 AC 128 ms
41,260 KB
testcase_25 AC 140 ms
41,624 KB
testcase_26 AC 117 ms
41,052 KB
testcase_27 AC 113 ms
40,044 KB
testcase_28 AC 126 ms
41,436 KB
testcase_29 AC 115 ms
40,064 KB
testcase_30 AC 110 ms
40,292 KB
testcase_31 AC 133 ms
40,896 KB
testcase_32 AC 131 ms
41,584 KB
testcase_33 AC 112 ms
41,204 KB
testcase_34 AC 123 ms
40,516 KB
testcase_35 AC 127 ms
40,408 KB
testcase_36 AC 130 ms
41,840 KB
testcase_37 AC 142 ms
42,184 KB
testcase_38 AC 157 ms
42,008 KB
testcase_39 AC 138 ms
42,472 KB
testcase_40 AC 167 ms
43,296 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	public static void main (String[] args) {
    	Scanner sc = new Scanner(System.in);
    	long left = sc.nextLong();
    	long right = sc.nextLong();
    	int n = sc.nextInt();
    	long[] smalls = new long[n];
    	Arrays.fill(smalls, (left - 1) / n);
    	for (int i = 1; i <= (left - 1) % n; i++) {
    	    smalls[i]++;
    	}
     	long[] larges = new long[n];
    	Arrays.fill(larges, right / n);
    	for (int i = 1; i <= right % n; i++) {
    	    larges[i]++;
    	}
    	StringBuilder sb = new StringBuilder();
    	for (int i = 0; i < n; i++) {
    	    sb.append(larges[i] - smalls[i]).append("\n");
    	}
    	System.out.print(sb);
	}
}
0