結果

問題 No.2335 Jump
ユーザー AdamantiteAdamantite
提出日時 2023-06-30 19:51:27
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 74 ms / 2,000 ms
コード長 455 bytes
コンパイル時間 17,348 ms
コンパイル使用メモリ 145,040 KB
実行使用メモリ 171,052 KB
最終ジャッジ日時 2023-09-21 13:30:36
合計ジャッジ時間 21,953 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
28,144 KB
testcase_01 AC 46 ms
28,132 KB
testcase_02 AC 47 ms
27,924 KB
testcase_03 AC 46 ms
28,140 KB
testcase_04 AC 47 ms
28,116 KB
testcase_05 AC 46 ms
27,904 KB
testcase_06 AC 46 ms
28,244 KB
testcase_07 AC 47 ms
28,304 KB
testcase_08 AC 47 ms
28,132 KB
testcase_09 AC 48 ms
30,212 KB
testcase_10 AC 47 ms
28,296 KB
testcase_11 AC 47 ms
28,312 KB
testcase_12 AC 71 ms
40,284 KB
testcase_13 AC 74 ms
40,096 KB
testcase_14 AC 71 ms
40,464 KB
testcase_15 AC 70 ms
42,340 KB
testcase_16 AC 72 ms
40,028 KB
testcase_17 AC 64 ms
37,740 KB
testcase_18 AC 74 ms
40,492 KB
testcase_19 AC 73 ms
40,068 KB
testcase_20 AC 64 ms
35,752 KB
testcase_21 AC 66 ms
171,052 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  Determining projects to restore...
  Restored /home/judge/data/code/main.csproj (in 122 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 No02335_Jump
{
    internal class Program
    {
        static void Main(string[] args) {
            int n = int.Parse(Console.ReadLine());
            int[] map = Array.ConvertAll(Console.ReadLine().Split(' '), x => int.Parse(x));
            int count = map[0] - 1;
            for(int i = 1; i < n; i++) {
                count += map[i] - map[i - 1] - 1;
            }
            Console.WriteLine(count);
        }
    }
}
0