結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー yui-taryui-tar
提出日時 2021-03-24 19:36:43
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 197 ms / 2,000 ms
コード長 360 bytes
コンパイル時間 2,038 ms
コンパイル使用メモリ 99,704 KB
実行使用メモリ 48,452 KB
最終ジャッジ日時 2023-08-17 22:31:50
合計ジャッジ時間 4,998 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
20,684 KB
testcase_01 AC 59 ms
20,828 KB
testcase_02 AC 59 ms
20,748 KB
testcase_03 AC 59 ms
18,760 KB
testcase_04 AC 60 ms
20,820 KB
testcase_05 AC 61 ms
20,808 KB
testcase_06 AC 67 ms
20,908 KB
testcase_07 AC 72 ms
23,936 KB
testcase_08 AC 88 ms
26,312 KB
testcase_09 AC 95 ms
28,436 KB
testcase_10 AC 162 ms
44,828 KB
testcase_11 AC 166 ms
47,084 KB
testcase_12 AC 167 ms
43,140 KB
testcase_13 AC 169 ms
45,416 KB
testcase_14 AC 172 ms
43,504 KB
testcase_15 AC 175 ms
45,752 KB
testcase_16 AC 197 ms
48,452 KB
testcase_17 AC 60 ms
22,764 KB
testcase_18 AC 59 ms
20,836 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
class Sample
{
    public static void Main()
    {
        long num = int.Parse(Console.ReadLine());
        string str = Console.ReadLine();
        string[] st = str.Split(" ");
        long sum = 0;
        for(long i= 0; i < num; i++)
        {
            sum += long.Parse(st[i]);
        }
        Console.WriteLine(sum);
        

    }
}
0