結果

問題 No.970 数列変換マシン
ユーザー keymoonkeymoon
提出日時 2020-01-17 21:23:16
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 139 ms / 2,000 ms
コード長 1,360 bytes
コンパイル時間 2,794 ms
コンパイル使用メモリ 106,320 KB
実行使用メモリ 41,172 KB
最終ジャッジ日時 2023-09-08 01:22:27
合計ジャッジ時間 6,586 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 139 ms
39,136 KB
testcase_01 AC 136 ms
41,172 KB
testcase_02 AC 137 ms
38,988 KB
testcase_03 AC 131 ms
35,508 KB
testcase_04 AC 129 ms
37,584 KB
testcase_05 AC 134 ms
36,384 KB
testcase_06 AC 115 ms
32,508 KB
testcase_07 AC 132 ms
37,620 KB
testcase_08 AC 133 ms
37,568 KB
testcase_09 AC 73 ms
22,180 KB
testcase_10 AC 73 ms
19,988 KB
testcase_11 AC 73 ms
22,372 KB
testcase_12 AC 73 ms
22,128 KB
testcase_13 AC 74 ms
24,188 KB
testcase_14 AC 74 ms
24,340 KB
testcase_15 AC 65 ms
21,932 KB
testcase_16 AC 66 ms
21,892 KB
testcase_17 AC 66 ms
21,940 KB
testcase_18 AC 66 ms
21,820 KB
testcase_19 AC 66 ms
21,840 KB
testcase_20 AC 65 ms
21,900 KB
testcase_21 AC 66 ms
19,768 KB
testcase_22 AC 67 ms
23,916 KB
testcase_23 AC 67 ms
21,776 KB
testcase_24 AC 67 ms
21,916 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;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static Reader;
using static System.Math;
using MethodImplAttribute = System.Runtime.CompilerServices.MethodImplAttribute;
using MethodImplOptions = System.Runtime.CompilerServices.MethodImplOptions;

public static class P
{
    public static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        var a = Console.ReadLine().Split().Select(long.Parse).ToArray();
        var sum = a.Sum();

        Console.WriteLine(string.Join(" ", a.Select(x => sum - x * (n - 1))));
    }
}


static class Reader
{
    const int BUF_SIZE = 1 << 12;
    static Stream Stream = Console.OpenStandardInput();
    static byte[] Buffer = new byte[BUF_SIZE];
    static int ptr = BUF_SIZE - 1;
    static void Move() { if (++ptr >= Buffer.Length) { Stream.Read(Buffer, 0, BUF_SIZE); ptr = 0; } }


    public static int NextInt
    {
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        get
        {
            int res = 0; while (Buffer[ptr] < 48) Move();
            do { res = res * 10 + (int)(Buffer[ptr] ^ 48); Move(); } while (48 <= Buffer[ptr]);
            return res;
        }
    }
}
0