結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー zmirezzmirez
提出日時 2018-04-16 17:12:07
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 182 ms / 2,000 ms
コード長 435 bytes
コンパイル時間 2,618 ms
コンパイル使用メモリ 103,208 KB
実行使用メモリ 46,420 KB
最終ジャッジ日時 2023-09-09 10:54:04
合計ジャッジ時間 5,938 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
20,824 KB
testcase_01 AC 55 ms
20,688 KB
testcase_02 AC 55 ms
18,688 KB
testcase_03 AC 56 ms
22,660 KB
testcase_04 AC 53 ms
20,724 KB
testcase_05 AC 56 ms
20,760 KB
testcase_06 AC 63 ms
20,688 KB
testcase_07 AC 69 ms
21,660 KB
testcase_08 AC 84 ms
26,124 KB
testcase_09 AC 90 ms
26,184 KB
testcase_10 AC 158 ms
44,660 KB
testcase_11 AC 161 ms
44,844 KB
testcase_12 AC 163 ms
45,004 KB
testcase_13 AC 166 ms
43,164 KB
testcase_14 AC 166 ms
41,316 KB
testcase_15 AC 166 ms
45,848 KB
testcase_16 AC 182 ms
46,420 KB
testcase_17 AC 54 ms
20,696 KB
testcase_18 AC 56 ms
22,816 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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)
        {
            long sum = 0;
            long s =long.Parse( Console.ReadLine()); //1行目
            string N = Console.ReadLine(); //2行目
            string[] t = N.Split(' ');
            for (int i = 0; i < s; i++)
            {
                sum += long.Parse(t[i]);
            }
            Console.WriteLine(sum);
        }
 
}
0