結果

問題 No.799 赤黒かーどげぇむ
ユーザー GodNegotoGodNegoto
提出日時 2019-11-11 15:50:39
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 426 bytes
コンパイル時間 3,138 ms
コンパイル使用メモリ 72,572 KB
実行使用メモリ 57,804 KB
最終ジャッジ日時 2023-10-13 08:05:05
合計ジャッジ時間 7,389 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,744 KB
testcase_01 AC 124 ms
55,444 KB
testcase_02 AC 123 ms
55,872 KB
testcase_03 AC 123 ms
55,940 KB
testcase_04 AC 122 ms
56,140 KB
testcase_05 AC 121 ms
55,824 KB
testcase_06 AC 124 ms
57,804 KB
testcase_07 AC 121 ms
55,700 KB
testcase_08 AC 123 ms
55,828 KB
testcase_09 AC 120 ms
55,920 KB
testcase_10 AC 122 ms
55,708 KB
testcase_11 AC 123 ms
56,132 KB
testcase_12 AC 121 ms
56,224 KB
testcase_13 AC 122 ms
55,460 KB
testcase_14 AC 122 ms
56,060 KB
testcase_15 AC 124 ms
55,892 KB
testcase_16 AC 123 ms
55,796 KB
testcase_17 AC 124 ms
56,192 KB
testcase_18 AC 124 ms
56,280 KB
testcase_19 AC 122 ms
55,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package algo;

import java.util.Scanner;

public class sample7 {

	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 cnt = 0;
		
		for(int i = A;  i <= B; i++){
			for(int j = C; j <= D; j++) {
				if(i != j) {
					cnt = cnt + 1;
				}
				else {
				}
			}
		}
		System.out.println(cnt);
	}
}
0