結果

問題 No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー cccccc
提出日時 2022-07-12 16:16:06
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 96 ms / 3,000 ms
コード長 317 bytes
コンパイル時間 10,062 ms
コンパイル使用メモリ 145,008 KB
実行使用メモリ 161,708 KB
最終ジャッジ日時 2023-09-05 18:38:36
合計ジャッジ時間 10,452 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
27,828 KB
testcase_01 AC 47 ms
27,824 KB
testcase_02 AC 48 ms
27,976 KB
testcase_03 AC 47 ms
27,692 KB
testcase_04 AC 48 ms
27,788 KB
testcase_05 AC 48 ms
27,760 KB
testcase_06 AC 48 ms
29,632 KB
testcase_07 AC 49 ms
28,464 KB
testcase_08 AC 56 ms
30,472 KB
testcase_09 AC 63 ms
31,992 KB
testcase_10 AC 90 ms
38,504 KB
testcase_11 AC 89 ms
38,700 KB
testcase_12 AC 90 ms
39,016 KB
testcase_13 AC 92 ms
41,276 KB
testcase_14 AC 90 ms
40,480 KB
testcase_15 AC 92 ms
40,640 KB
testcase_16 AC 96 ms
39,508 KB
testcase_17 AC 47 ms
27,812 KB
testcase_18 AC 48 ms
161,708 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  Determining projects to restore...
  Restored /home/judge/data/code/main.csproj (in 159 ms).
.NET 向け Microsoft (R) Build Engine バージョン 17.0.0-preview-21470-01+cb055d28f
Copyright (C) Microsoft Corporation.All rights reserved.

  プレビュー版の .NET を使用しています。https://aka.ms/dotnet-core-preview をご覧ください
  main -> /home/judge/data/code/bin/Release/net6.0/main.dll
  main -> /home/judge/data/code/bin/Release/net6.0/publish/

ソースコード

diff #

using System;
class Program
{
    static void Main()
    {
        int cnt = int.Parse(Console.ReadLine());
        long ans = 0;

        for(int i = 0; i < cnt; i++)
        {
            var line = long.Parse(Console.ReadLine());
            ans += line;
        }
        Console.WriteLine(ans);
        
    }
}
0