結果
問題 |
No.218 経験値1.5倍
|
ユーザー |
![]() |
提出日時 | 2016-09-23 11:26:51 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 936 bytes |
コンパイル時間 | 3,769 ms |
コンパイル使用メモリ | 74,744 KB |
実行使用メモリ | 55,936 KB |
最終ジャッジ日時 | 2024-11-17 17:36:56 |
合計ジャッジ時間 | 9,676 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 WA * 17 |
ソースコード
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%b); //余りが出ると+1 if(campaignremain !=0){ campaign = campaign+1; } //仮設を計算出力 if (nomal<=campaign/2*3){ System.out.println("YES"); } else{ System.out.println("NO"); } } }