結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー sasamesasame
提出日時 2017-05-09 10:37:17
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 197 ms / 2,000 ms
コード長 391 bytes
コンパイル時間 2,095 ms
コンパイル使用メモリ 99,320 KB
実行使用メモリ 46,236 KB
最終ジャッジ日時 2023-10-12 21:42:51
合計ジャッジ時間 5,018 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
20,776 KB
testcase_01 AC 57 ms
22,748 KB
testcase_02 AC 56 ms
20,716 KB
testcase_03 AC 57 ms
20,768 KB
testcase_04 AC 57 ms
22,824 KB
testcase_05 AC 57 ms
20,892 KB
testcase_06 AC 65 ms
20,920 KB
testcase_07 AC 69 ms
21,864 KB
testcase_08 AC 91 ms
24,208 KB
testcase_09 AC 94 ms
26,240 KB
testcase_10 AC 163 ms
42,676 KB
testcase_11 AC 165 ms
42,940 KB
testcase_12 AC 167 ms
41,016 KB
testcase_13 AC 171 ms
43,304 KB
testcase_14 AC 171 ms
43,388 KB
testcase_15 AC 174 ms
45,636 KB
testcase_16 AC 197 ms
46,236 KB
testcase_17 AC 56 ms
20,808 KB
testcase_18 AC 57 ms
20,668 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
public class Hello{
    public static void Main(){
        long num = Int64.Parse(Console.ReadLine());
        string[] input = Console.ReadLine().Split();
        long ans = 0;
        foreach (var i in input) {
            ans += Int64.Parse(i);
        }
        Console.WriteLine(ans);
    }
}
0