結果

問題 No.56 消費税
ユーザー MatumoMatumo
提出日時 2018-07-14 00:31:23
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 387 bytes
コンパイル時間 2,131 ms
コンパイル使用メモリ 75,580 KB
実行使用メモリ 41,864 KB
最終ジャッジ日時 2024-04-17 11:45:32
合計ジャッジ時間 6,604 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
41,456 KB
testcase_01 RE -
testcase_02 RE -
testcase_03 AC 132 ms
41,864 KB
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 AC 119 ms
40,240 KB
testcase_10 AC 129 ms
41,676 KB
testcase_11 AC 129 ms
41,604 KB
testcase_12 AC 131 ms
41,684 KB
testcase_13 AC 136 ms
41,536 KB
testcase_14 AC 131 ms
41,652 KB
testcase_15 RE -
testcase_16 RE -
testcase_17 AC 131 ms
41,468 KB
testcase_18 AC 131 ms
41,548 KB
testcase_19 AC 131 ms
41,840 KB
testcase_20 AC 132 ms
41,504 KB
testcase_21 AC 122 ms
40,288 KB
testcase_22 AC 132 ms
41,412 KB
testcase_23 AC 131 ms
41,468 KB
testcase_24 AC 131 ms
41,440 KB
testcase_25 AC 131 ms
41,736 KB
testcase_26 AC 130 ms
41,684 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.math.BigDecimal;
import java.util.Scanner;

public class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {

		BigDecimal b = new BigDecimal(sc.nextInt());
		BigDecimal p = new BigDecimal(sc.nextInt());
		p = p.divide(new BigDecimal(100));
		p = p.add(new BigDecimal(1));

		System.out.println(b.multiply(p).setScale(0));
    }
}
0