結果

問題 No.1748 Parking Lot
ユーザー O2MTO2MT
提出日時 2021-11-21 16:29:06
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 55 ms / 2,000 ms
コード長 417 bytes
コンパイル時間 9,286 ms
コンパイル使用メモリ 142,400 KB
実行使用メモリ 160,716 KB
最終ジャッジ日時 2023-09-05 02:03:34
合計ジャッジ時間 11,860 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
28,460 KB
testcase_01 AC 50 ms
30,440 KB
testcase_02 AC 51 ms
28,592 KB
testcase_03 AC 50 ms
28,744 KB
testcase_04 AC 51 ms
28,628 KB
testcase_05 AC 50 ms
28,560 KB
testcase_06 AC 50 ms
28,488 KB
testcase_07 AC 49 ms
28,824 KB
testcase_08 AC 50 ms
28,620 KB
testcase_09 AC 51 ms
28,752 KB
testcase_10 AC 50 ms
28,424 KB
testcase_11 AC 50 ms
28,700 KB
testcase_12 AC 55 ms
28,484 KB
testcase_13 AC 49 ms
28,828 KB
testcase_14 AC 50 ms
28,824 KB
testcase_15 AC 52 ms
28,460 KB
testcase_16 AC 50 ms
28,628 KB
testcase_17 AC 50 ms
28,680 KB
testcase_18 AC 51 ms
28,748 KB
testcase_19 AC 50 ms
30,540 KB
testcase_20 AC 50 ms
30,732 KB
testcase_21 AC 50 ms
28,712 KB
testcase_22 AC 50 ms
30,752 KB
testcase_23 AC 49 ms
160,716 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  Determining projects to restore...
  Restored /home/judge/data/code/main.csproj (in 176 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;
using System.Linq;

namespace Sample
{
    class Program
    {
        static void Main(string[] args)
        {
            var arr = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            var (N, K) = (arr[0], arr[1]);
            if (N == 1) Console.WriteLine(1);
            else if (K != N - 1) Console.WriteLine(N - 1);
            else Console.WriteLine(N);
        }     
    }
}
0