結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー Hidetoshi KamataHidetoshi Kamata
提出日時 2022-05-05 17:03:26
言語 C#
(.NET 8.0.203)
結果
RE  
実行時間 -
コード長 462 bytes
コンパイル時間 7,239 ms
コンパイル使用メモリ 145,788 KB
実行使用メモリ 173,420 KB
最終ジャッジ日時 2023-09-18 01:34:43
合計ジャッジ時間 11,516 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
28,796 KB
testcase_01 AC 49 ms
28,592 KB
testcase_02 AC 48 ms
28,680 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 AC 66 ms
35,720 KB
testcase_10 AC 93 ms
49,200 KB
testcase_11 AC 94 ms
49,728 KB
testcase_12 AC 94 ms
50,048 KB
testcase_13 AC 95 ms
48,636 KB
testcase_14 AC 98 ms
52,796 KB
testcase_15 AC 98 ms
51,208 KB
testcase_16 AC 105 ms
55,444 KB
testcase_17 AC 52 ms
31,044 KB
testcase_18 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
  Determining projects to restore...
  Restored /home/judge/data/code/main.csproj (in 125 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;

class Program
{
    static void Main(string[] args)
    {
        var line1 = Console.ReadLine();
        var line2 = Console.ReadLine();
        var count = Convert.ToInt32(line1);
        var values = line2.Split(" ", count);

        var total = 0;
        foreach (var i in Enumerable.Range(0, count))
        {
            total += Convert.ToInt32(values[i]);
        }
        Console.WriteLine(total.ToString());
    }
}
0