結果

問題 No.987 N×Mマス計算(基本)
ユーザー curryudon08curryudon08
提出日時 2020-06-23 17:55:29
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 908 bytes
コンパイル時間 2,247 ms
コンパイル使用メモリ 106,984 KB
実行使用メモリ 23,812 KB
最終ジャッジ日時 2023-09-16 20:02:53
合計ジャッジ時間 4,580 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
21,708 KB
testcase_01 AC 62 ms
21,640 KB
testcase_02 AC 62 ms
19,712 KB
testcase_03 AC 63 ms
21,656 KB
testcase_04 AC 63 ms
21,616 KB
testcase_05 AC 62 ms
23,812 KB
testcase_06 AC 62 ms
19,624 KB
testcase_07 AC 65 ms
23,680 KB
testcase_08 AC 65 ms
21,664 KB
testcase_09 AC 64 ms
23,788 KB
testcase_10 WA -
testcase_11 AC 65 ms
21,624 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 63 ms
21,688 KB
testcase_15 AC 63 ms
21,664 KB
testcase_16 AC 62 ms
21,704 KB
testcase_17 WA -
testcase_18 AC 63 ms
21,632 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 long[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