結果

問題 No.836 じょうよ
ユーザー tentententen
提出日時 2020-09-01 01:43:18
言語 Java21
(openjdk 21)
結果
AC  
実行時間 222 ms / 1,000 ms
コード長 692 bytes
コンパイル時間 2,830 ms
コンパイル使用メモリ 73,152 KB
実行使用メモリ 58,824 KB
最終ジャッジ日時 2023-08-10 18:20:23
合計ジャッジ時間 12,264 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 206 ms
58,388 KB
testcase_01 AC 120 ms
55,940 KB
testcase_02 AC 115 ms
56,096 KB
testcase_03 AC 118 ms
56,340 KB
testcase_04 AC 121 ms
55,816 KB
testcase_05 AC 122 ms
55,868 KB
testcase_06 AC 120 ms
55,676 KB
testcase_07 AC 121 ms
56,076 KB
testcase_08 AC 121 ms
55,816 KB
testcase_09 AC 119 ms
55,980 KB
testcase_10 AC 122 ms
53,912 KB
testcase_11 AC 146 ms
56,136 KB
testcase_12 AC 156 ms
55,856 KB
testcase_13 AC 151 ms
55,984 KB
testcase_14 AC 123 ms
55,684 KB
testcase_15 AC 155 ms
55,868 KB
testcase_16 AC 222 ms
58,824 KB
testcase_17 AC 208 ms
58,764 KB
testcase_18 AC 146 ms
55,796 KB
testcase_19 AC 159 ms
55,712 KB
testcase_20 AC 187 ms
58,468 KB
testcase_21 AC 125 ms
55,660 KB
testcase_22 AC 148 ms
55,624 KB
testcase_23 AC 174 ms
57,724 KB
testcase_24 AC 134 ms
55,532 KB
testcase_25 AC 142 ms
56,288 KB
testcase_26 AC 120 ms
56,252 KB
testcase_27 AC 122 ms
55,684 KB
testcase_28 AC 138 ms
55,828 KB
testcase_29 AC 125 ms
56,040 KB
testcase_30 AC 124 ms
55,492 KB
testcase_31 AC 151 ms
56,356 KB
testcase_32 AC 141 ms
56,228 KB
testcase_33 AC 124 ms
55,720 KB
testcase_34 AC 153 ms
55,656 KB
testcase_35 AC 138 ms
55,720 KB
testcase_36 AC 155 ms
55,976 KB
testcase_37 AC 153 ms
56,064 KB
testcase_38 AC 165 ms
58,076 KB
testcase_39 AC 156 ms
58,124 KB
testcase_40 AC 181 ms
56,128 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