結果

問題 No.799 赤黒かーどげぇむ
ユーザー practikovat
提出日時 2019-05-22 17:03:29
言語 Java
(openjdk 23)
結果
AC  
実行時間 117 ms / 2,000 ms
コード長 405 bytes
コンパイル時間 2,867 ms
コンパイル使用メモリ 74,752 KB
実行使用メモリ 54,260 KB
最終ジャッジ日時 2024-09-17 09:36:33
合計ジャッジ時間 6,086 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class CardGame {
	public static void main(String args[]) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();
		int d = scan.nextInt();
		int cnt = 0;

		for(int i = a; i <= b; i++) {
			for(int j = c; j <= d; j++) {
				if(i != j) {
					cnt++;
				}
			}
		}

		System.out.println(cnt);
		return;
	}
}
0