結果
問題 |
No.836 じょうよ
|
ユーザー |
![]() |
提出日時 | 2019-06-14 22:01:24 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 531 bytes |
コンパイル時間 | 3,209 ms |
コンパイル使用メモリ | 74,508 KB |
実行使用メモリ | 57,436 KB |
最終ジャッジ日時 | 2024-11-14 05:52:05 |
合計ジャッジ時間 | 11,778 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 WA * 12 |
ソースコード
import java.io.PrintWriter; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); long l = sc.nextLong(); long r = sc.nextLong(); long n = sc.nextLong(); sc.close(); long a = l % n; long b = r % n; long c = (r - l) / n; PrintWriter pw = new PrintWriter(System.out); for (int i = 0; i < n; i++) { long ans = c; if (i >= a) { ans++; } if (i > b) { ans--; } pw.println(ans); } pw.flush(); } }