結果

問題 No.682 Average
ユーザー tsunabittsunabit
提出日時 2019-06-23 11:26:45
言語 Java19
(openjdk 21)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 379 bytes
コンパイル時間 3,519 ms
コンパイル使用メモリ 72,072 KB
実行使用メモリ 56,020 KB
最終ジャッジ日時 2023-08-27 03:22:51
合計ジャッジ時間 5,905 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
56,012 KB
testcase_01 AC 126 ms
54,164 KB
testcase_02 AC 126 ms
55,820 KB
testcase_03 AC 127 ms
56,020 KB
testcase_04 AC 128 ms
55,876 KB
testcase_05 AC 124 ms
55,988 KB
testcase_06 AC 127 ms
55,800 KB
testcase_07 AC 126 ms
55,724 KB
testcase_08 AC 127 ms
55,780 KB
testcase_09 AC 128 ms
55,760 KB
testcase_10 AC 126 ms
55,488 KB
testcase_11 AC 126 ms
55,784 KB
testcase_12 AC 126 ms
55,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
import java.math.*;

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