結果

問題 No.836 じょうよ
ユーザー face4face4
提出日時 2019-06-12 20:54:19
言語 Java21
(openjdk 21)
結果
AC  
実行時間 548 ms / 1,000 ms
コード長 680 bytes
コンパイル時間 2,203 ms
コンパイル使用メモリ 75,144 KB
実行使用メモリ 64,588 KB
最終ジャッジ日時 2024-04-20 01:20:01
合計ジャッジ時間 13,511 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 460 ms
64,588 KB
testcase_01 AC 107 ms
52,740 KB
testcase_02 AC 123 ms
53,888 KB
testcase_03 AC 114 ms
54,160 KB
testcase_04 AC 114 ms
53,900 KB
testcase_05 AC 118 ms
53,100 KB
testcase_06 AC 109 ms
53,024 KB
testcase_07 AC 106 ms
52,780 KB
testcase_08 AC 105 ms
52,636 KB
testcase_09 AC 120 ms
54,308 KB
testcase_10 AC 120 ms
54,044 KB
testcase_11 AC 217 ms
54,864 KB
testcase_12 AC 232 ms
55,692 KB
testcase_13 AC 217 ms
54,648 KB
testcase_14 AC 153 ms
54,172 KB
testcase_15 AC 219 ms
54,824 KB
testcase_16 AC 515 ms
63,088 KB
testcase_17 AC 467 ms
63,504 KB
testcase_18 AC 216 ms
54,352 KB
testcase_19 AC 253 ms
57,740 KB
testcase_20 AC 357 ms
61,988 KB
testcase_21 AC 174 ms
54,464 KB
testcase_22 AC 334 ms
62,764 KB
testcase_23 AC 459 ms
60,824 KB
testcase_24 AC 179 ms
54,376 KB
testcase_25 AC 291 ms
61,160 KB
testcase_26 AC 149 ms
54,400 KB
testcase_27 AC 160 ms
53,124 KB
testcase_28 AC 200 ms
55,432 KB
testcase_29 AC 189 ms
54,532 KB
testcase_30 AC 168 ms
54,408 KB
testcase_31 AC 220 ms
55,412 KB
testcase_32 AC 211 ms
55,600 KB
testcase_33 AC 154 ms
53,784 KB
testcase_34 AC 207 ms
55,328 KB
testcase_35 AC 225 ms
55,608 KB
testcase_36 AC 365 ms
62,820 KB
testcase_37 AC 350 ms
60,332 KB
testcase_38 AC 428 ms
62,940 KB
testcase_39 AC 380 ms
63,584 KB
testcase_40 AC 548 ms
64,368 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