結果

問題 No.56 消費税
ユーザー mustonmuston
提出日時 2016-05-19 17:00:40
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 423 bytes
コンパイル時間 2,335 ms
コンパイル使用メモリ 74,828 KB
実行使用メモリ 42,056 KB
最終ジャッジ日時 2024-04-16 01:24:16
合計ジャッジ時間 7,118 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 149 ms
41,776 KB
testcase_01 WA -
testcase_02 AC 143 ms
41,424 KB
testcase_03 AC 145 ms
41,540 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 146 ms
41,648 KB
testcase_10 AC 149 ms
42,032 KB
testcase_11 AC 145 ms
41,548 KB
testcase_12 AC 146 ms
41,596 KB
testcase_13 AC 142 ms
41,672 KB
testcase_14 AC 148 ms
41,632 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 143 ms
41,756 KB
testcase_18 AC 150 ms
41,560 KB
testcase_19 AC 145 ms
41,880 KB
testcase_20 AC 150 ms
41,692 KB
testcase_21 AC 152 ms
41,680 KB
testcase_22 AC 148 ms
41,748 KB
testcase_23 AC 147 ms
41,716 KB
testcase_24 AC 146 ms
42,028 KB
testcase_25 AC 144 ms
41,596 KB
testcase_26 AC 141 ms
41,600 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
/*yukicoder No56 消費税*/
class No56{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    double d = scan.nextDouble();  //買いたいものの金額
    double p = scan.nextDouble();  //消費税
    //消費税をかけて実際の金額を出す
    double amount = d*(1+p/100);
    //実際の金額を出力
    System.out.println(Math.round(amount));
  }
}
0