結果

問題 No.1992 Tendon Walk
ユーザー junjun
提出日時 2022-07-08 18:18:48
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 47 ms / 2,000 ms
コード長 630 bytes
コンパイル時間 7,847 ms
コンパイル使用メモリ 146,700 KB
実行使用メモリ 164,940 KB
最終ジャッジ日時 2023-08-27 17:29:24
合計ジャッジ時間 9,086 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
28,008 KB
testcase_01 AC 46 ms
27,944 KB
testcase_02 AC 47 ms
29,952 KB
testcase_03 AC 45 ms
27,732 KB
testcase_04 AC 47 ms
27,676 KB
testcase_05 AC 46 ms
28,120 KB
testcase_06 AC 46 ms
29,936 KB
testcase_07 AC 46 ms
27,752 KB
testcase_08 AC 46 ms
164,940 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  Determining projects to restore...
  Restored /home/judge/data/code/main.csproj (in 120 ms).
.NET 向け Microsoft (R) Build Engine バージョン 17.0.0-preview-21470-01+cb055d28f
Copyright (C) Microsoft Corporation.All rights reserved.

  プレビュー版の .NET を使用しています。https://aka.ms/dotnet-core-preview をご覧ください
  main -> /home/judge/data/code/bin/Release/net6.0/main.dll
  main -> /home/judge/data/code/bin/Release/net6.0/publish/

ソースコード

diff #

using System;

namespace ConsoleApp3
{
    class Program
    {
        static void Main(string[] args)
        {

            var x = int.Parse(Console.ReadLine());

            if (x == 2)
            {
                Console.WriteLine(2);
                return;
            }

            switch (x % 2)
            {
                case 0:
                    Console.WriteLine((x - 4) / 2 * 10 + 4);
                    break;
                case 1:
                    Console.WriteLine((x - 3) / 2 * 10 + 5);
                    break;
                default:
                    break;
            }
        }
    }
}
0