結果

問題 No.987 N×Mマス計算(基本)
ユーザー curryudon08curryudon08
提出日時 2020-06-23 17:54:56
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 907 bytes
コンパイル時間 2,040 ms
コンパイル使用メモリ 108,240 KB
実行使用メモリ 25,756 KB
最終ジャッジ日時 2023-09-16 20:03:21
合計ジャッジ時間 4,220 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
21,844 KB
testcase_01 AC 60 ms
21,716 KB
testcase_02 AC 63 ms
23,904 KB
testcase_03 AC 62 ms
21,728 KB
testcase_04 AC 61 ms
21,840 KB
testcase_05 AC 60 ms
25,756 KB
testcase_06 AC 62 ms
21,728 KB
testcase_07 AC 63 ms
21,708 KB
testcase_08 AC 61 ms
21,672 KB
testcase_09 AC 62 ms
21,868 KB
testcase_10 WA -
testcase_11 AC 63 ms
23,764 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 62 ms
23,796 KB
testcase_15 AC 63 ms
21,736 KB
testcase_16 AC 63 ms
21,836 KB
testcase_17 WA -
testcase_18 AC 64 ms
21,804 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;
using System.Linq;
using System.Collections.Generic;

namespace _0987
{
    class Program
    {
        static void Main(string[] args)
        {
            var _ = Console.ReadLine().Split();
            var n = int.Parse(_[0]);
            var m = int.Parse(_[1]);

            var __ = Console.ReadLine().Split();
            var op = __[0];
            var s = __.Skip(1).Select(t => int.Parse(t)).ToArray();

            for(var i = 0; i < n; i++){
                var x = int.Parse(Console.ReadLine());

                var a = new int[m];
                for(var j = 0; j < m; j++){
                    if(op.Equals("+")){
                        a[j] = s[j] + x;
                    }else{
                        a[j] = s[j] * x;
                    }
                }
                Console.WriteLine(string.Join(" ",a.Select(t => t.ToString())));
            }
        }
    }
}
0