結果

問題 No.799 赤黒かーどげぇむ
ユーザー Beat7501Beat7501
提出日時 2019-03-28 17:14:19
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 345 bytes
コンパイル時間 2,456 ms
コンパイル使用メモリ 74,036 KB
実行使用メモリ 54,656 KB
最終ジャッジ日時 2024-04-21 08:13:39
合計ジャッジ時間 5,942 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
54,308 KB
testcase_01 AC 131 ms
53,896 KB
testcase_02 AC 135 ms
54,096 KB
testcase_03 AC 132 ms
54,176 KB
testcase_04 AC 129 ms
54,040 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 129 ms
54,320 KB
testcase_08 AC 131 ms
54,240 KB
testcase_09 AC 130 ms
54,544 KB
testcase_10 AC 129 ms
54,036 KB
testcase_11 AC 128 ms
54,108 KB
testcase_12 WA -
testcase_13 AC 119 ms
54,492 KB
testcase_14 AC 129 ms
54,140 KB
testcase_15 AC 131 ms
53,972 KB
testcase_16 AC 131 ms
54,168 KB
testcase_17 AC 132 ms
54,148 KB
testcase_18 AC 133 ms
54,400 KB
testcase_19 AC 136 ms
54,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Yuki799{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int d = sc.nextInt();
		int aka = b-a+1;
		int kuro = d-c+1;
		int dab = a<c?Math.max(0,b-c+1):Math.max(0,d-a+1);
		System.out.println(aka*kuro-dab);
	}
}
0