結果

問題 No.682 Average
ユーザー youthfuldays072youthfuldays072
提出日時 2018-05-25 09:47:42
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 419 bytes
コンパイル時間 2,070 ms
コンパイル使用メモリ 71,924 KB
実行使用メモリ 55,952 KB
最終ジャッジ日時 2023-09-11 03:20:41
合計ジャッジ時間 4,649 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,856 KB
testcase_01 AC 126 ms
55,660 KB
testcase_02 AC 126 ms
55,868 KB
testcase_03 AC 127 ms
55,908 KB
testcase_04 AC 128 ms
55,652 KB
testcase_05 AC 126 ms
55,952 KB
testcase_06 AC 126 ms
55,724 KB
testcase_07 AC 125 ms
55,768 KB
testcase_08 AC 124 ms
55,820 KB
testcase_09 AC 125 ms
55,884 KB
testcase_10 AC 125 ms
55,672 KB
testcase_11 AC 127 ms
55,736 KB
testcase_12 AC 126 ms
55,776 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {


    public static void main(String[] args) {

    	Main main=new Main();

    	main.run();

    }

    void run() {
    	Scanner sc=new Scanner(System.in);

    	int A=sc.nextInt();
    	int B=sc.nextInt();

    	int counter=0;

    	for(int i=A;i<=B;i++) {

    		if((A+B+i)%3==0) {
    			counter++;
    		}

    	}

    	System.out.println(counter);

    }



}





0