結果

問題 No.682 Average
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-05-18 01:33:12
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 304 bytes
コンパイル時間 2,067 ms
コンパイル使用メモリ 71,312 KB
実行使用メモリ 55,852 KB
最終ジャッジ日時 2023-09-10 22:47:55
合計ジャッジ時間 4,500 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,564 KB
testcase_01 AC 122 ms
55,604 KB
testcase_02 AC 124 ms
55,704 KB
testcase_03 AC 123 ms
55,428 KB
testcase_04 AC 125 ms
55,792 KB
testcase_05 AC 122 ms
55,736 KB
testcase_06 AC 125 ms
55,660 KB
testcase_07 AC 124 ms
55,380 KB
testcase_08 AC 123 ms
55,612 KB
testcase_09 AC 122 ms
55,620 KB
testcase_10 AC 125 ms
55,676 KB
testcase_11 AC 123 ms
55,852 KB
testcase_12 AC 125 ms
55,556 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import static java.lang.System.*;
import java.util.*;

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