結果

問題 No.56 消費税
ユーザー tsunabittsunabit
提出日時 2018-04-15 10:53:24
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 1,113 bytes
コンパイル時間 3,376 ms
コンパイル使用メモリ 71,724 KB
実行使用メモリ 56,364 KB
最終ジャッジ日時 2023-09-09 05:38:35
合計ジャッジ時間 7,966 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,900 KB
testcase_01 AC 120 ms
55,872 KB
testcase_02 AC 121 ms
55,424 KB
testcase_03 WA -
testcase_04 AC 121 ms
55,768 KB
testcase_05 AC 125 ms
55,536 KB
testcase_06 AC 118 ms
55,760 KB
testcase_07 AC 119 ms
56,020 KB
testcase_08 AC 120 ms
55,616 KB
testcase_09 AC 120 ms
55,936 KB
testcase_10 AC 119 ms
56,240 KB
testcase_11 AC 119 ms
56,092 KB
testcase_12 AC 119 ms
55,832 KB
testcase_13 AC 119 ms
56,364 KB
testcase_14 AC 119 ms
55,816 KB
testcase_15 AC 120 ms
55,412 KB
testcase_16 AC 120 ms
56,320 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

// 問題文
// ある国の通貨単位は「ユキコダ」である。
// いまからDユキコダの品物を買おうとしている?
// しかし、品物の金額に対して消費税率P%の消費税が加算される。
// 実際に支払う金額はいくらか?
// ただし、小数点以下は切り捨てします。
// ***
// 入力
// D P
// Dは買おうとしている消費税を含まない品物の金額。1≤D≤10000000=107 (Dは正の整数。)
// Pはこの国の消費税率。0≤P≤100(Pは整数。)
// ***
// 出力
// 消費税を考慮した実際に支払う金額を1行で出力せよ。
// ただし、最後に改行を忘れずに。

public class No56 {
    public static void main(String[] args) {
        // 標準入力から読み込む際に、Scannerオブジェクトを使う。
        Scanner sc = new Scanner(System.in);
        int d = sc.nextInt();
        int p = sc.nextInt();

        double rit = 1.00 + ((double)p / 100);
        // System.out.println("rit = " + rit);
        System.out.println((int)(d * rit));
    }
}
0