結果

問題 No.773 コンテスト
ユーザー GodNegoto
提出日時 2019-11-16 11:03:38
言語 Java
(openjdk 23)
結果
AC  
実行時間 135 ms / 2,000 ms
コード長 407 bytes
コンパイル時間 3,739 ms
コンパイル使用メモリ 81,064 KB
実行使用メモリ 54,300 KB
最終ジャッジ日時 2024-09-24 23:19:18
合計ジャッジ時間 7,924 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

package algo;

import java.util.*;

public class sample1 {
	public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int A = sc.nextInt();
	int B = sc.nextInt();
	List<Integer> list = new ArrayList<>();
	list.add(23);
	list.add(24);
	list.add(25);
	int cnt = 3;
	for(int l : list) {
		for(int i = A; i <= B; i++) {
			if(i == l) {
				cnt--;
			}
		}
	}
	System.out.println(cnt);
	}
}
0