結果

問題 No.682 Average
ユーザー uma-pinehilluma-pinehill
提出日時 2018-05-17 14:51:51
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 369 bytes
コンパイル時間 4,572 ms
コンパイル使用メモリ 98,492 KB
実行使用メモリ 22,904 KB
最終ジャッジ日時 2023-09-10 22:32:28
合計ジャッジ時間 6,200 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 56 ms
20,768 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 57 ms
20,772 KB
testcase_08 WA -
testcase_09 AC 57 ms
22,668 KB
testcase_10 AC 57 ms
20,684 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) + ((((a + b) % 3 == 0)||((a + b)%3 + dif % 3)>=3) ? 1 : 0);
        Console.WriteLine(result);
    }
}
0