結果

問題 No.369 足し間違い
ユーザー mban259mban259
提出日時 2016-05-13 22:25:04
言語 C#(csc)
(csc 3.9.0)
結果
TLE  
実行時間 -
コード長 516 bytes
コンパイル時間 1,472 ms
コンパイル使用メモリ 103,424 KB
実行使用メモリ 48,400 KB
最終ジャッジ日時 2024-04-15 16:33:21
合計ジャッジ時間 4,700 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 24 ms
23,552 KB
testcase_01 AC 28 ms
17,664 KB
testcase_02 AC 24 ms
17,792 KB
testcase_03 AC 24 ms
18,176 KB
testcase_04 TLE -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

class A {
    static int N, v;
    static int[] a;
   static void Main() {
        Read();
        int ans = 0;
        for(int i = 0; i < N; i++) {
            ans += a[i];
        }
        Console.WriteLine(ans - v);
    }
    static void Read() {
        N = int.Parse(Console.ReadLine());
        a = new int[N];
        string s = Console.ReadLine();
        for(int i = 0; i < N; i++) {
            a[i] = int.Parse(s.Split(' ')[i]);
        }
        v = int.Parse(Console.ReadLine());
    }
}
0