結果

問題 No.682 Average
ユーザー htensaihtensai
提出日時 2019-12-07 14:17:25
言語 Java21
(openjdk 21)
結果
AC  
実行時間 113 ms / 2,000 ms
コード長 384 bytes
コンパイル時間 3,407 ms
コンパイル使用メモリ 72,168 KB
実行使用メモリ 56,232 KB
最終ジャッジ日時 2023-08-26 17:35:58
合計ジャッジ時間 6,455 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 109 ms
55,496 KB
testcase_01 AC 108 ms
56,156 KB
testcase_02 AC 109 ms
55,704 KB
testcase_03 AC 108 ms
56,180 KB
testcase_04 AC 113 ms
55,836 KB
testcase_05 AC 109 ms
55,900 KB
testcase_06 AC 109 ms
55,824 KB
testcase_07 AC 106 ms
55,744 KB
testcase_08 AC 104 ms
55,576 KB
testcase_09 AC 104 ms
56,232 KB
testcase_10 AC 110 ms
55,500 KB
testcase_11 AC 110 ms
55,788 KB
testcase_12 AC 112 ms
56,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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