結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー zmirezzmirez
提出日時 2018-04-16 16:54:08
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 457 bytes
コンパイル時間 2,486 ms
コンパイル使用メモリ 99,176 KB
実行使用メモリ 50,228 KB
最終ジャッジ日時 2023-09-09 10:53:33
合計ジャッジ時間 5,947 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
20,584 KB
testcase_01 AC 56 ms
20,592 KB
testcase_02 AC 56 ms
20,540 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 AC 92 ms
28,236 KB
testcase_10 AC 159 ms
44,564 KB
testcase_11 AC 161 ms
42,772 KB
testcase_12 AC 164 ms
43,080 KB
testcase_13 AC 164 ms
45,196 KB
testcase_14 AC 166 ms
45,420 KB
testcase_15 AC 168 ms
45,564 KB
testcase_16 AC 190 ms
50,228 KB
testcase_17 AC 57 ms
22,748 KB
testcase_18 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
public class Program2
    {
        static void Main(string[] args)
        {
            int sum = 0;
            string S = Console.ReadLine(); //1行目
            int s = int.Parse(S);
            string N = Console.ReadLine(); //2行目
            string[] t = N.Split(' ');
            for (int i = 0; i < s; i++)
            {
                sum += int.Parse(t[i]);
            }
            Console.WriteLine(sum);
        }
 
}
0