結果

問題 No.84 悪の算盤
ユーザー kou6839kou6839
提出日時 2014-12-04 11:41:31
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 421 bytes
コンパイル時間 5,356 ms
コンパイル使用メモリ 72,476 KB
実行使用メモリ 56,320 KB
最終ジャッジ日時 2023-09-02 07:48:15
合計ジャッジ時間 4,873 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,952 KB
testcase_01 AC 119 ms
56,320 KB
testcase_02 AC 119 ms
56,160 KB
testcase_03 AC 119 ms
55,944 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 118 ms
55,644 KB
testcase_08 AC 117 ms
55,604 KB
testcase_09 AC 117 ms
56,032 KB
testcase_10 AC 118 ms
55,996 KB
testcase_11 AC 118 ms
55,844 KB
testcase_12 AC 119 ms
56,048 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.math.*;
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String n=sc.next();
		String k=sc.next();
		BigDecimal a = new BigDecimal(n);
		BigDecimal b = new BigDecimal(k);
		a = a.multiply(b);
		a=a.divide(new BigDecimal(2),0,BigDecimal.ROUND_CEILING);
		System.out.println(a.subtract(new BigDecimal(1)));
		
		
	}
}	
0