結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
41,280 KB
testcase_01 AC 128 ms
41,652 KB
testcase_02 AC 115 ms
40,444 KB
testcase_03 AC 114 ms
40,316 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 127 ms
41,188 KB
testcase_08 AC 136 ms
41,364 KB
testcase_09 AC 139 ms
41,480 KB
testcase_10 AC 138 ms
41,460 KB
testcase_11 AC 135 ms
41,592 KB
testcase_12 AC 118 ms
40,128 KB
testcase_13 AC 134 ms
41,524 KB
testcase_14 AC 132 ms
41,324 KB
testcase_15 AC 133 ms
41,272 KB
testcase_16 AC 130 ms
41,244 KB
testcase_17 WA -
testcase_18 AC 131 ms
41,496 KB
testcase_19 AC 129 ms
41,484 KB
testcase_20 AC 132 ms
41,400 KB
testcase_21 WA -
testcase_22 AC 134 ms
41,468 KB
testcase_23 AC 137 ms
41,472 KB
testcase_24 AC 136 ms
41,172 KB
testcase_25 AC 138 ms
41,056 KB
testcase_26 AC 134 ms
41,516 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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