結果

問題 No.682 Average
ユーザー fal_rndfal_rnd
提出日時 2018-05-12 12:49:18
言語 Java21
(openjdk 21)
結果
AC  
実行時間 117 ms / 2,000 ms
コード長 308 bytes
コンパイル時間 2,865 ms
コンパイル使用メモリ 75,992 KB
実行使用メモリ 56,184 KB
最終ジャッジ日時 2023-09-10 18:20:48
合計ジャッジ時間 5,388 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
56,092 KB
testcase_01 AC 117 ms
55,764 KB
testcase_02 AC 116 ms
56,100 KB
testcase_03 AC 116 ms
55,804 KB
testcase_04 AC 116 ms
55,664 KB
testcase_05 AC 116 ms
55,672 KB
testcase_06 AC 116 ms
55,708 KB
testcase_07 AC 116 ms
55,732 KB
testcase_08 AC 117 ms
55,876 KB
testcase_09 AC 117 ms
55,848 KB
testcase_10 AC 117 ms
55,568 KB
testcase_11 AC 117 ms
55,780 KB
testcase_12 AC 117 ms
56,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.util.stream.*;

class Main{
	static Scanner s=new Scanner(System.in);
	static int gInt(){
		return Integer.parseInt(s.next());
	}
	public static void main(String[] A){
		int a=gInt(),b=gInt();
		System.out.println(IntStream.range(a,b+1).filter(i->(a+b+i)%3==0).count());
	}
}
0