結果

問題 No.56 消費税
ユーザー hhgfhn1
提出日時 2018-08-21 16:15:29
言語 Java
(openjdk 23)
結果
AC  
実行時間 126 ms / 5,000 ms
コード長 507 bytes
コンパイル時間 2,808 ms
コンパイル使用メモリ 75,584 KB
実行使用メモリ 54,536 KB
最終ジャッジ日時 2024-12-15 23:46:04
合計ジャッジ時間 6,407 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

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

class sampleA {
	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scan = new Scanner(System.in);
		double d = scan.nextInt();
		double p = scan.nextInt();
		BigDecimal bdD = new BigDecimal(d);
		BigDecimal bdP = new BigDecimal(p);
		BigDecimal one =new BigDecimal(1);
		BigDecimal hundred =new BigDecimal(100);
		int answer = bdD.multiply(one.add(bdP.divide(hundred))).intValue();
		
		System.out.println(answer);
	}
}
0