結果

問題 No.836 じょうよ
ユーザー face4face4
提出日時 2019-06-12 20:54:19
言語 Java19
(openjdk 21)
結果
AC  
実行時間 525 ms / 1,000 ms
コード長 680 bytes
コンパイル時間 2,197 ms
コンパイル使用メモリ 71,476 KB
実行使用メモリ 64,744 KB
最終ジャッジ日時 2023-08-02 00:34:54
合計ジャッジ時間 14,838 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 489 ms
64,200 KB
testcase_01 AC 118 ms
56,176 KB
testcase_02 AC 116 ms
56,152 KB
testcase_03 AC 114 ms
56,172 KB
testcase_04 AC 114 ms
55,852 KB
testcase_05 AC 124 ms
56,116 KB
testcase_06 AC 114 ms
56,116 KB
testcase_07 AC 115 ms
56,100 KB
testcase_08 AC 115 ms
56,044 KB
testcase_09 AC 118 ms
56,316 KB
testcase_10 AC 112 ms
56,080 KB
testcase_11 AC 215 ms
57,108 KB
testcase_12 AC 245 ms
59,316 KB
testcase_13 AC 214 ms
57,028 KB
testcase_14 AC 148 ms
56,176 KB
testcase_15 AC 229 ms
56,920 KB
testcase_16 AC 494 ms
62,140 KB
testcase_17 AC 484 ms
64,744 KB
testcase_18 AC 213 ms
56,544 KB
testcase_19 AC 253 ms
59,388 KB
testcase_20 AC 361 ms
63,144 KB
testcase_21 AC 163 ms
56,712 KB
testcase_22 AC 339 ms
61,708 KB
testcase_23 AC 504 ms
63,884 KB
testcase_24 AC 191 ms
56,388 KB
testcase_25 AC 307 ms
63,272 KB
testcase_26 AC 162 ms
56,144 KB
testcase_27 AC 174 ms
58,156 KB
testcase_28 AC 223 ms
57,708 KB
testcase_29 AC 170 ms
56,140 KB
testcase_30 AC 168 ms
56,312 KB
testcase_31 AC 226 ms
57,448 KB
testcase_32 AC 215 ms
57,544 KB
testcase_33 AC 159 ms
56,468 KB
testcase_34 AC 219 ms
57,884 KB
testcase_35 AC 212 ms
57,416 KB
testcase_36 AC 376 ms
61,508 KB
testcase_37 AC 356 ms
64,120 KB
testcase_38 AC 439 ms
64,168 KB
testcase_39 AC 413 ms
63,960 KB
testcase_40 AC 525 ms
64,736 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.IOException;
import java.io.InputStreamReader;
import java.io.BufferedReader;

import java.util.Scanner;

class Main{
    public static void main(String[] args) throws IOException{
        Scanner sc = new Scanner(System.in);
        long l = sc.nextLong();
        long r = sc.nextLong();
        int n = sc.nextInt();
        int ans[] = new int[n];
    
        while(l % n != 0 && l <= r){
            ans[(int)(l%n)]++;
            l++;
        }

        long x = (r-l)/n;

        l += x * n;
        while(l <= r){
            ans[(int)(l%n)]++;
            l++;
        }
        
        for(int i = 0; i < n; i++)  System.out.println(ans[i] + x);
    }
}
0