結果

問題 No.1992 Tendon Walk
ユーザー junjun
提出日時 2022-07-08 18:16:13
言語 C#
(.NET 8.0.203)
結果
WA  
実行時間 -
コード長 624 bytes
コンパイル時間 8,695 ms
コンパイル使用メモリ 148,092 KB
実行使用メモリ 161,228 KB
最終ジャッジ日時 2023-08-27 17:26:16
合計ジャッジ時間 8,861 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
28,036 KB
testcase_01 AC 44 ms
27,848 KB
testcase_02 WA -
testcase_03 AC 44 ms
27,796 KB
testcase_04 WA -
testcase_05 AC 44 ms
29,800 KB
testcase_06 AC 43 ms
27,848 KB
testcase_07 AC 43 ms
28,048 KB
testcase_08 AC 44 ms
161,228 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  Determining projects to restore...
  Restored /home/judge/data/code/main.csproj (in 115 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 * 10 + 4);
                    break;
                case 1:
                    Console.WriteLine((x - 3) / 2 * 10 + 5);
                    break;
                default:
                    break;
            }
        }
    }
}
0