結果

問題 No.682 Average
ユーザー isimiyaisimiya
提出日時 2018-05-23 20:47:15
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 428 bytes
コンパイル時間 1,427 ms
コンパイル使用メモリ 65,592 KB
実行使用メモリ 22,768 KB
最終ジャッジ日時 2023-09-11 01:54:15
合計ジャッジ時間 2,746 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 56 ms
18,816 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 57 ms
20,660 KB
testcase_06 AC 58 ms
20,812 KB
testcase_07 AC 57 ms
20,608 KB
testcase_08 AC 56 ms
20,680 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 57 ms
22,768 KB
testcase_12 AC 57 ms
22,708 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;

public class Classmiya
{
	static void Main()
	{
		string stdin = Console.ReadLine();
		string[] text = stdin.Split(' ');
		int A = int.Parse(text[0]);
		int B = int.Parse(text[1]);
		int count = 0;
		double average = 0.0;

		for (int i = A + 1; i < B; i++){
			average = (A + B + i) / 3.0;

			if(average == Convert.ToDouble(Convert.ToInt32(average))){
				count += 1;
			}
		}
		Console.WriteLine(count);
    }
}
0