結果

問題 No.56 消費税
ユーザー mustonmuston
提出日時 2016-05-19 16:53:23
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 417 bytes
コンパイル時間 2,198 ms
コンパイル使用メモリ 79,032 KB
実行使用メモリ 41,760 KB
最終ジャッジ日時 2024-04-16 01:24:05
合計ジャッジ時間 6,994 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
41,252 KB
testcase_01 WA -
testcase_02 AC 139 ms
41,196 KB
testcase_03 AC 144 ms
40,988 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 138 ms
41,100 KB
testcase_10 AC 141 ms
41,116 KB
testcase_11 AC 139 ms
41,144 KB
testcase_12 AC 138 ms
41,372 KB
testcase_13 AC 138 ms
41,264 KB
testcase_14 AC 139 ms
41,356 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 142 ms
41,404 KB
testcase_18 AC 137 ms
41,232 KB
testcase_19 AC 147 ms
41,276 KB
testcase_20 AC 136 ms
41,500 KB
testcase_21 AC 138 ms
41,340 KB
testcase_22 AC 138 ms
41,244 KB
testcase_23 AC 141 ms
41,220 KB
testcase_24 AC 139 ms
41,320 KB
testcase_25 AC 140 ms
41,120 KB
testcase_26 AC 145 ms
41,140 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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