結果

問題 No.84 悪の算盤
ユーザー uafr_csuafr_cs
提出日時 2015-05-15 03:15:12
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 5,000 ms
コード長 349 bytes
コンパイル時間 2,575 ms
コンパイル使用メモリ 74,256 KB
実行使用メモリ 41,644 KB
最終ジャッジ日時 2024-04-21 10:04:24
合計ジャッジ時間 4,288 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
39,896 KB
testcase_01 AC 107 ms
40,304 KB
testcase_02 AC 120 ms
40,948 KB
testcase_03 AC 125 ms
41,284 KB
testcase_04 AC 115 ms
40,108 KB
testcase_05 AC 122 ms
41,644 KB
testcase_06 AC 110 ms
39,968 KB
testcase_07 AC 120 ms
40,816 KB
testcase_08 AC 115 ms
41,048 KB
testcase_09 AC 109 ms
40,260 KB
testcase_10 AC 112 ms
39,972 KB
testcase_11 AC 124 ms
41,524 KB
testcase_12 AC 113 ms
39,968 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.LinkedList;
import java.util.Scanner;

public class Main {
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		final long R = sc.nextLong();
		final long C = sc.nextLong();
		
		System.out.println(Math.max(0, (R * C / (R == C ? 4 : 2)) - (R * C % 2 == 0 ? 1 : 0)));
	}
	
}
0