結果

問題 No.369 足し間違い
ユーザー NoNo
提出日時 2016-06-08 18:58:31
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 33 ms / 2,000 ms
コード長 658 bytes
コンパイル時間 864 ms
コンパイル使用メモリ 112,780 KB
実行使用メモリ 27,644 KB
最終ジャッジ日時 2024-04-17 09:52:50
合計ジャッジ時間 1,579 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
27,124 KB
testcase_01 AC 24 ms
22,580 KB
testcase_02 AC 27 ms
26,996 KB
testcase_03 AC 26 ms
24,948 KB
testcase_04 AC 33 ms
25,728 KB
testcase_05 AC 29 ms
23,092 KB
testcase_06 AC 33 ms
27,644 KB
testcase_07 AC 32 ms
25,724 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.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace yukikoda
{
    class Program
    {
        static void Main(string[] args)
        {
            string n = Console.ReadLine();
            var a = ConvertStringArrayToIntList(Console.ReadLine().Split());
            long b = 0;
            Console.WriteLine(a.Sum() - long.Parse(Console.ReadLine()));
        }

        static List<int> ConvertStringArrayToIntList(string[] str)
        {
            var list = new List<int>();
            foreach (var c in str) list.Add(int.Parse(c));
            return list;
        }
    }
}
0