結果
問題 |
No.218 経験値1.5倍
|
ユーザー |
|
提出日時 | 2018-02-11 12:53:02 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 815 bytes |
コンパイル時間 | 3,578 ms |
コンパイル使用メモリ | 73,888 KB |
実行使用メモリ | 37,800 KB |
最終ジャッジ日時 | 2024-11-15 20:08:44 |
合計ジャッジ時間 | 6,677 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 WA * 7 |
ソースコード
package me.yukicoder; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.math.BigDecimal; import java.math.RoundingMode; public class No0218 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); double a = Double.parseDouble(br.readLine()); int b = Integer.parseInt(br.readLine()); int c = Integer.parseInt(br.readLine()); BigDecimal cntUp = new BigDecimal(a / b).setScale(0, RoundingMode.UP); BigDecimal cntUp_campaign = new BigDecimal(a / c).setScale(0, RoundingMode.UP); // ⇔通常時の2/3の割合で足りているか int ret = cntUp.compareTo(cntUp_campaign.multiply(new BigDecimal("1.5"))); System.out.println(ret >= 1 ? "YES" : "NO"); } }