結果
問題 |
No.2259 Gas Station
|
ユーザー |
|
提出日時 | 2023-05-15 21:09:54 |
言語 | Java (openjdk 23) |
結果 |
RE
|
実行時間 | - |
コード長 | 438 bytes |
コンパイル時間 | 3,495 ms |
コンパイル使用メモリ | 78,628 KB |
実行使用メモリ | 56,296 KB |
最終ジャッジ日時 | 2024-12-14 03:01:03 |
合計ジャッジ時間 | 7,693 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 21 |
ソースコード
import java.util.Scanner; public class MyMain { final static String YUKICODER = "yukicoder"; public static void main(String[] args) { Scanner sc = new Scanner(System.in); long l = Long.parseLong(sc.nextLine()); long r = Long.parseLong(sc.nextLine()); long c = Long.parseLong(sc.nextLine()); final long y = 1000; long x = y / c; System.out.println((x >= l && x <= r) ? y - (c * x) : y - (c * r)); sc.close(); } }