結果

問題 No.333 門松列を数え上げ
ユーザー NoNo
提出日時 2016-01-15 22:52:32
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 26 ms / 2,000 ms
コード長 672 bytes
コンパイル時間 924 ms
コンパイル使用メモリ 106,080 KB
実行使用メモリ 24,156 KB
最終ジャッジ日時 2023-10-19 23:27:59
合計ジャッジ時間 1,725 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Yuki
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split(); ;
            int a = int.Parse(s[0]);
            int b = int.Parse(s[1]);
            int ans;

            if (a > b)
            {
                ans = 2000000000 - b - 1;
            }
            else
            {
                ans = b - 2;
                if (b == 0)
                {
                    ans = 0;
                }
            }
            Console.WriteLine(ans);
        }
    }
}
0