結果

問題 No.682 Average
ユーザー Mcpu3Mcpu3
提出日時 2018-06-22 00:10:11
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 261 bytes
コンパイル時間 1,946 ms
コンパイル使用メモリ 71,932 KB
実行使用メモリ 58,056 KB
最終ジャッジ日時 2023-09-13 07:45:49
合計ジャッジ時間 4,566 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,828 KB
testcase_01 AC 126 ms
55,700 KB
testcase_02 AC 125 ms
55,812 KB
testcase_03 AC 126 ms
56,052 KB
testcase_04 AC 128 ms
56,204 KB
testcase_05 AC 127 ms
55,692 KB
testcase_06 AC 128 ms
55,684 KB
testcase_07 AC 127 ms
55,844 KB
testcase_08 AC 128 ms
55,680 KB
testcase_09 AC 128 ms
55,716 KB
testcase_10 AC 124 ms
56,192 KB
testcase_11 AC 128 ms
55,576 KB
testcase_12 AC 125 ms
58,056 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class no682{
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int a,b,i,s=0;
		a=stdIn.nextInt();
		b=stdIn.nextInt();
		for(i=a;i<=b;i++) if((a+b+i)%3==0) s++;
		System.out.print(s);
	}
}
0