結果

問題 No.56 消費税
ユーザー mustonmuston
提出日時 2016-05-19 17:11:08
言語 Java21
(openjdk 21)
結果
AC  
実行時間 140 ms / 5,000 ms
コード長 420 bytes
コンパイル時間 3,169 ms
コンパイル使用メモリ 70,708 KB
実行使用メモリ 56,376 KB
最終ジャッジ日時 2023-09-25 03:33:46
合計ジャッジ時間 7,806 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
55,768 KB
testcase_01 AC 140 ms
56,008 KB
testcase_02 AC 136 ms
55,780 KB
testcase_03 AC 137 ms
55,968 KB
testcase_04 AC 138 ms
55,936 KB
testcase_05 AC 136 ms
55,920 KB
testcase_06 AC 138 ms
56,076 KB
testcase_07 AC 137 ms
56,284 KB
testcase_08 AC 136 ms
55,892 KB
testcase_09 AC 136 ms
56,192 KB
testcase_10 AC 138 ms
56,184 KB
testcase_11 AC 137 ms
56,036 KB
testcase_12 AC 136 ms
56,244 KB
testcase_13 AC 135 ms
56,200 KB
testcase_14 AC 135 ms
56,376 KB
testcase_15 AC 136 ms
56,288 KB
testcase_16 AC 136 ms
55,860 KB
testcase_17 AC 140 ms
55,860 KB
testcase_18 AC 138 ms
56,004 KB
testcase_19 AC 137 ms
55,976 KB
testcase_20 AC 137 ms
55,960 KB
testcase_21 AC 136 ms
55,612 KB
testcase_22 AC 137 ms
55,720 KB
testcase_23 AC 138 ms
53,876 KB
testcase_24 AC 137 ms
55,840 KB
testcase_25 AC 136 ms
55,996 KB
testcase_26 AC 135 ms
56,012 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*(100+p))/100;
    //実際の金額を出力
    System.out.println((int)amount);
  }
}
0