結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー 3gin30
提出日時 2020-02-19 01:43:48
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 161 ms / 2,000 ms
コード長 362 bytes
コンパイル時間 770 ms
コンパイル使用メモリ 107,620 KB
実行使用メモリ 45,952 KB
最終ジャッジ日時 2024-10-06 15:59:59
合計ジャッジ時間 3,145 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 15
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

class Program
{

    static void Main()
    {

        long n = long.Parse(Console.ReadLine());
        string s = Console.ReadLine();

        string[] strs = s.Split(" ");

        long sum = 0;
        foreach (string str in strs)
        {
            sum += long.Parse(str);
        }

        Console.WriteLine("{0}", sum);

        
    }
}
0