結果
問題 | No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用) |
ユーザー | Hidetoshi Kamata |
提出日時 | 2022-05-05 17:05:52 |
言語 | C# (.NET 8.0.203) |
結果 |
AC
|
実行時間 | 104 ms / 2,000 ms |
コード長 | 462 bytes |
コンパイル時間 | 7,986 ms |
コンパイル使用メモリ | 146,976 KB |
実行使用メモリ | 166,468 KB |
最終ジャッジ日時 | 2023-09-18 01:37:29 |
合計ジャッジ時間 | 10,171 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 49 ms
28,816 KB |
testcase_01 | AC | 49 ms
28,764 KB |
testcase_02 | AC | 49 ms
28,688 KB |
testcase_03 | AC | 49 ms
28,900 KB |
testcase_04 | AC | 50 ms
30,904 KB |
testcase_05 | AC | 50 ms
30,724 KB |
testcase_06 | AC | 51 ms
31,252 KB |
testcase_07 | AC | 53 ms
30,444 KB |
testcase_08 | AC | 62 ms
35,336 KB |
testcase_09 | AC | 67 ms
35,852 KB |
testcase_10 | AC | 93 ms
49,436 KB |
testcase_11 | AC | 95 ms
49,596 KB |
testcase_12 | AC | 96 ms
52,208 KB |
testcase_13 | AC | 96 ms
50,580 KB |
testcase_14 | AC | 98 ms
48,780 KB |
testcase_15 | AC | 98 ms
51,348 KB |
testcase_16 | AC | 104 ms
53,172 KB |
testcase_17 | AC | 50 ms
28,712 KB |
testcase_18 | AC | 49 ms
166,468 KB |
コンパイルメッセージ
Determining projects to restore... Restored /home/judge/data/code/main.csproj (in 130 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 をご覧ください /home/judge/data/code/Main.cs(13,22): warning CS0078: l' と 数字の '1' との混同を避けるため、'L' を使用してください [/home/judge/data/code/main.csproj] main -> /home/judge/data/code/bin/Release/net6.0/main.dll main -> /home/judge/data/code/bin/Release/net6.0/publish/
ソースコード
using System; using System.Linq; class Program { static void Main(string[] args) { var line1 = Console.ReadLine(); var line2 = Console.ReadLine(); var count = Convert.ToInt32(line1); var values = line2.Split(" ", count); var total = 0l; foreach (var i in Enumerable.Range(0, count)) { total += Convert.ToInt64(values[i]); } Console.WriteLine(total.ToString()); } }