結果

問題 No.1389 Clumsy Calculation
ユーザー bluemeganebluemegane
提出日時 2021-02-13 10:27:12
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 142 ms / 2,000 ms
コード長 382 bytes
コンパイル時間 1,087 ms
コンパイル使用メモリ 67,628 KB
実行使用メモリ 48,920 KB
最終ジャッジ日時 2023-09-27 18:38:24
合計ジャッジ時間 5,411 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
21,660 KB
testcase_01 AC 53 ms
21,532 KB
testcase_02 AC 54 ms
21,544 KB
testcase_03 AC 63 ms
23,752 KB
testcase_04 AC 64 ms
23,812 KB
testcase_05 AC 61 ms
21,920 KB
testcase_06 AC 62 ms
21,940 KB
testcase_07 AC 63 ms
23,860 KB
testcase_08 AC 53 ms
21,640 KB
testcase_09 AC 142 ms
48,920 KB
testcase_10 AC 107 ms
35,948 KB
testcase_11 AC 63 ms
21,692 KB
testcase_12 AC 61 ms
21,788 KB
testcase_13 AC 63 ms
21,836 KB
testcase_14 AC 126 ms
40,668 KB
testcase_15 AC 124 ms
38,592 KB
testcase_16 AC 122 ms
40,756 KB
testcase_17 AC 127 ms
43,504 KB
testcase_18 AC 126 ms
41,476 KB
testcase_19 AC 123 ms
43,508 KB
testcase_20 AC 130 ms
41,404 KB
testcase_21 AC 126 ms
41,528 KB
testcase_22 AC 124 ms
41,560 KB
testcase_23 AC 123 ms
43,528 KB
testcase_24 AC 125 ms
41,512 KB
testcase_25 AC 125 ms
43,576 KB
testcase_26 AC 126 ms
41,928 KB
testcase_27 AC 126 ms
42,924 KB
testcase_28 AC 126 ms
41,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System.Linq;
using System;

public class Hello
{
    static void Main()
    {
        string[] line = Console.ReadLine().Trim().Split(' ');
        var n = int.Parse(line[0]);
        var x = long.Parse(line[1]);
        line = Console.ReadLine().Trim().Split(' ');
        var a = Array.ConvertAll(line, long.Parse);
        Console.WriteLine(a.Sum() - x * (n - 1));
    }
}
0