結果

問題 No.218 経験値1.5倍
ユーザー ontama_12ontama_12
提出日時 2016-09-23 11:29:19
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 935 bytes
コンパイル時間 2,121 ms
コンパイル使用メモリ 74,228 KB
実行使用メモリ 41,620 KB
最終ジャッジ日時 2024-04-28 21:27:00
合計ジャッジ時間 7,174 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 128 ms
40,932 KB
testcase_07 AC 128 ms
41,032 KB
testcase_08 AC 119 ms
40,256 KB
testcase_09 AC 132 ms
41,088 KB
testcase_10 AC 130 ms
41,256 KB
testcase_11 WA -
testcase_12 AC 119 ms
40,160 KB
testcase_13 AC 129 ms
41,140 KB
testcase_14 AC 118 ms
40,160 KB
testcase_15 WA -
testcase_16 AC 131 ms
40,916 KB
testcase_17 AC 135 ms
41,376 KB
testcase_18 AC 130 ms
40,948 KB
testcase_19 AC 130 ms
41,016 KB
testcase_20 AC 130 ms
41,076 KB
testcase_21 AC 125 ms
40,308 KB
testcase_22 AC 123 ms
39,860 KB
testcase_23 AC 132 ms
41,264 KB
testcase_24 AC 119 ms
40,152 KB
testcase_25 AC 135 ms
41,088 KB
testcase_26 WA -
testcase_27 AC 131 ms
41,620 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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");
       }
    }
}
0