結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
24,244 KB
testcase_01 AC 26 ms
21,940 KB
testcase_02 AC 28 ms
24,040 KB
testcase_03 AC 27 ms
24,304 KB
testcase_04 AC 27 ms
23,912 KB
testcase_05 AC 28 ms
24,300 KB
testcase_06 AC 28 ms
23,920 KB
testcase_07 AC 28 ms
24,156 KB
testcase_08 AC 27 ms
24,172 KB
testcase_09 AC 27 ms
26,084 KB
testcase_10 WA -
testcase_11 AC 28 ms
21,944 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 26 ms
24,172 KB
testcase_15 AC 27 ms
24,044 KB
testcase_16 AC 28 ms
21,944 KB
testcase_17 WA -
testcase_18 AC 29 ms
26,080 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 int[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