結果

問題 No.987 N×Mマス計算(基本)
ユーザー bluemeganebluemegane
提出日時 2020-02-15 11:16:23
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 680 bytes
コンパイル時間 783 ms
コンパイル使用メモリ 110,836 KB
実行使用メモリ 28,384 KB
最終ジャッジ日時 2024-04-16 03:08:47
合計ジャッジ時間 2,037 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
17,920 KB
testcase_01 AC 26 ms
18,048 KB
testcase_02 AC 28 ms
18,688 KB
testcase_03 AC 27 ms
18,176 KB
testcase_04 AC 27 ms
18,432 KB
testcase_05 AC 26 ms
18,176 KB
testcase_06 AC 27 ms
18,176 KB
testcase_07 AC 27 ms
18,176 KB
testcase_08 AC 25 ms
17,920 KB
testcase_09 AC 26 ms
17,920 KB
testcase_10 WA -
testcase_11 AC 27 ms
18,560 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 26 ms
18,048 KB
testcase_15 AC 27 ms
18,432 KB
testcase_16 AC 28 ms
18,944 KB
testcase_17 WA -
testcase_18 AC 28 ms
18,560 KB
testcase_19 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class Hello
{
    static void Main()
    {
        string[] line = Console.ReadLine().Trim().Split(' ');
        var n = int.Parse(line[0]);
        var m = int.Parse(line[1]);
        var a = new int[m];
        line = Console.ReadLine().Trim().Split(' ');
        var op = line[0];
        for (int i = 1; i <= m; i++) a[i - 1] = int.Parse(line[i]);
        var ans = new long[m];
        for (int i = 0; i < n; i++)
        {
            var t = int.Parse(Console.ReadLine().Trim());
            for (int j = 0; j < m; j++)
                ans[j] = op == "+" ? a[j] + t : a[j] * t;
            Console.WriteLine(string.Join(" ", ans));
        }
    }
}

0