結果
問題 |
No.218 経験値1.5倍
|
ユーザー |
![]() |
提出日時 | 2016-09-23 11:29:19 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 935 bytes |
コンパイル時間 | 2,297 ms |
コンパイル使用メモリ | 74,324 KB |
実行使用メモリ | 54,496 KB |
最終ジャッジ日時 | 2024-11-17 17:37:04 |
合計ジャッジ時間 | 7,552 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 WA * 12 |
ソースコード
import java.util.Scanner; public class Main { public static void main(String[] args) { //入力文字をの読み取り Scanner sc = new Scanner(System.in); //1文字目 long a = sc.nextLong(); //2文字目 long b = sc.nextLong(); //3文字目 long c = sc.nextLong(); //通常での必要な素材数 long nomal = a/b; int nomalremain = (int) (a%b); //余りが出ると+1 if(nomalremain !=0){ nomal = nomal+1; } //キャンペーン期間での必要な素材数 long campaign = a%c; int campaignremain = (int) (a%c); //余りが出ると+1 if(campaignremain !=0){ campaign = campaign+1; } //仮設を計算出力 if (nomal*2/3>=campaign){ System.out.println("YES"); } else{ System.out.println("NO"); } } }