結果

問題 No.799 赤黒かーどげぇむ
ユーザー GodNegoto
提出日時 2019-11-11 15:50:39
言語 Java
(openjdk 23)
結果
AC  
実行時間 134 ms / 2,000 ms
コード長 426 bytes
コンパイル時間 3,287 ms
コンパイル使用メモリ 73,728 KB
実行使用メモリ 41,088 KB
最終ジャッジ日時 2024-09-15 05:16:03
合計ジャッジ時間 6,847 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

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