結果

問題 No.56 消費税
ユーザー kazapyon27kazapyon27
提出日時 2017-05-06 22:28:11
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 5,000 ms
コード長 427 bytes
コンパイル時間 3,385 ms
コンパイル使用メモリ 72,584 KB
実行使用メモリ 56,720 KB
最終ジャッジ日時 2023-10-12 15:17:57
合計ジャッジ時間 7,980 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,740 KB
testcase_01 AC 121 ms
55,900 KB
testcase_02 AC 122 ms
56,036 KB
testcase_03 AC 123 ms
54,124 KB
testcase_04 AC 124 ms
56,284 KB
testcase_05 AC 124 ms
56,068 KB
testcase_06 AC 121 ms
55,900 KB
testcase_07 AC 122 ms
56,232 KB
testcase_08 AC 122 ms
55,904 KB
testcase_09 AC 123 ms
56,440 KB
testcase_10 AC 122 ms
55,884 KB
testcase_11 AC 122 ms
56,288 KB
testcase_12 AC 122 ms
56,288 KB
testcase_13 AC 122 ms
56,060 KB
testcase_14 AC 122 ms
56,140 KB
testcase_15 AC 120 ms
55,644 KB
testcase_16 AC 122 ms
56,496 KB
testcase_17 AC 122 ms
55,736 KB
testcase_18 AC 119 ms
55,960 KB
testcase_19 AC 120 ms
55,928 KB
testcase_20 AC 121 ms
56,056 KB
testcase_21 AC 120 ms
56,640 KB
testcase_22 AC 121 ms
56,144 KB
testcase_23 AC 121 ms
55,972 KB
testcase_24 AC 122 ms
55,704 KB
testcase_25 AC 123 ms
56,720 KB
testcase_26 AC 121 ms
56,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/*No.56 消費税*/
import java.util.*;
import java.math.*;
public class No56 {
	public static void main(String[] args) {
		try(Scanner input = new Scanner(System.in)){
			byte tax;
			int zeinuki;
			zeinuki=input.nextInt();
			tax=input.nextByte();
			BigDecimal bd =new BigDecimal(zeinuki+zeinuki*tax/100);
			System.out.println(bd.setScale(0, BigDecimal.ROUND_DOWN));
		}catch(Exception e){
			e.printStackTrace();
		}
	}
}
0