結果

問題 No.369 足し間違い
ユーザー mban259
提出日時 2016-05-13 22:39:33
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 29 ms / 2,000 ms
コード長 401 bytes
コンパイル時間 790 ms
コンパイル使用メモリ 110,824 KB
実行使用メモリ 27,088 KB
最終ジャッジ日時 2024-10-05 16:55:39
合計ジャッジ時間 1,432 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5
権限があれば一括ダウンロードができます
コンパイルメッセージ
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;
    static int ans = 0;
   static void Main() {
        Read();
        Console.WriteLine(ans);
    }
    static void Read() {
        N = int.Parse(Console.ReadLine());
        string[] s = Console.ReadLine().Split(' ');
        for(int i = 0; i < N; i++) {
            ans += int.Parse(s[i]);
        }
        ans -= int.Parse(Console.ReadLine());
    }
}
0