結果

問題 No.682 Average
ユーザー uma-pinehilluma-pinehill
提出日時 2018-05-17 14:56:17
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 371 bytes
コンパイル時間 5,415 ms
コンパイル使用メモリ 103,976 KB
実行使用メモリ 24,776 KB
最終ジャッジ日時 2023-09-10 22:32:46
合計ジャッジ時間 3,552 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 57 ms
22,664 KB
testcase_06 AC 56 ms
20,676 KB
testcase_07 AC 55 ms
20,668 KB
testcase_08 WA -
testcase_09 AC 56 ms
20,796 KB
testcase_10 AC 56 ms
20,892 KB
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class Program
{
    static void Main()
    {
        string s = Console.ReadLine();
        string[] t = s.Split(' ');
        int a = int.Parse(t[0]);
        int b = int.Parse(t[1]);
        int dif = b - a + 1;
        int result = (dif / 3)|0 + ((((a + b) % 3 == 0)||((a + b)%3 + dif % 3)>=3) ? 1 : 0);
        Console.WriteLine(result);
    }
}
0