結果

問題 No.56 消費税
ユーザー sasakki
提出日時 2016-03-24 16:02:07
言語 Java
(openjdk 23)
結果
AC  
実行時間 129 ms / 5,000 ms
コード長 345 bytes
コンパイル時間 3,314 ms
コンパイル使用メモリ 74,220 KB
実行使用メモリ 54,416 KB
最終ジャッジ日時 2024-07-18 03:08:50
合計ジャッジ時間 6,124 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

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

class main{
    public static void main(String args[]){
	Scanner scan = new Scanner(System.in);

	BigDecimal price = new BigDecimal(scan.nextLong());
	BigDecimal tax = new BigDecimal(price.intValue() *  scan.nextInt() * 0.01);
	
	System.out.println( price.add(tax).intValue() );
	
    }
}
0