結果

問題 No.84 悪の算盤
ユーザー カニ戯(ryカニ戯(ry
提出日時 2015-02-25 14:01:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 141 ms / 5,000 ms
コード長 242 bytes
コンパイル時間 2,118 ms
コンパイル使用メモリ 74,792 KB
実行使用メモリ 54,376 KB
最終ジャッジ日時 2024-04-21 10:00:37
合計ジャッジ時間 4,580 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
53,912 KB
testcase_01 AC 134 ms
53,904 KB
testcase_02 AC 137 ms
53,784 KB
testcase_03 AC 138 ms
53,972 KB
testcase_04 AC 131 ms
53,972 KB
testcase_05 AC 134 ms
54,100 KB
testcase_06 AC 141 ms
54,376 KB
testcase_07 AC 130 ms
54,216 KB
testcase_08 AC 130 ms
53,724 KB
testcase_09 AC 133 ms
53,956 KB
testcase_10 AC 131 ms
53,752 KB
testcase_11 AC 131 ms
53,972 KB
testcase_12 AC 131 ms
53,876 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;


public class Main {
	public static void main(String[] a) {
		Scanner s=new Scanner(System.in);
		long R=s.nextLong(),C=s.nextLong(),S=R*C%2>0?R==C?(R-1)*(R+1)/4:R*C/2:R*C/(R==C?4:2)-1;
		System.out.println(S);
	}
}
0