結果

問題 No.56 消費税
ユーザー l1267976l1267976
提出日時 2017-03-15 00:14:10
言語 Java21
(openjdk 21)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 349 bytes
コンパイル時間 3,000 ms
コンパイル使用メモリ 70,828 KB
実行使用メモリ 56,600 KB
最終ジャッジ日時 2023-09-25 03:56:09
合計ジャッジ時間 7,900 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
56,244 KB
testcase_01 AC 137 ms
56,128 KB
testcase_02 AC 136 ms
56,144 KB
testcase_03 AC 135 ms
56,276 KB
testcase_04 AC 134 ms
55,884 KB
testcase_05 AC 136 ms
56,356 KB
testcase_06 AC 139 ms
55,932 KB
testcase_07 AC 138 ms
56,496 KB
testcase_08 AC 136 ms
56,600 KB
testcase_09 AC 138 ms
55,896 KB
testcase_10 WA -
testcase_11 AC 136 ms
55,980 KB
testcase_12 AC 136 ms
55,740 KB
testcase_13 AC 138 ms
56,144 KB
testcase_14 AC 135 ms
56,080 KB
testcase_15 AC 136 ms
56,012 KB
testcase_16 AC 138 ms
56,132 KB
testcase_17 AC 142 ms
56,144 KB
testcase_18 AC 137 ms
56,244 KB
testcase_19 AC 137 ms
55,728 KB
testcase_20 AC 137 ms
55,808 KB
testcase_21 AC 139 ms
56,016 KB
testcase_22 AC 138 ms
56,196 KB
testcase_23 AC 137 ms
53,976 KB
testcase_24 AC 137 ms
55,952 KB
testcase_25 AC 137 ms
55,956 KB
testcase_26 AC 135 ms
56,220 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No56 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double d = sc.nextDouble();
        double p = sc.nextDouble();

        int tax = (int) (d * (p / 100));
        int sum = (int) d + tax;

        System.out.println(sum);

        sc.close();
    }

}
0