結果

問題 No.987 N×Mマス計算(基本)
ユーザー boya978boya978
提出日時 2020-03-01 06:05:05
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 30 ms / 2,000 ms
コード長 948 bytes
コンパイル時間 2,552 ms
コンパイル使用メモリ 109,588 KB
実行使用メモリ 26,204 KB
最終ジャッジ日時 2024-04-21 22:05:54
合計ジャッジ時間 2,160 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
24,088 KB
testcase_01 AC 25 ms
24,088 KB
testcase_02 AC 28 ms
24,236 KB
testcase_03 AC 27 ms
23,960 KB
testcase_04 AC 27 ms
24,292 KB
testcase_05 AC 27 ms
26,132 KB
testcase_06 AC 27 ms
22,200 KB
testcase_07 AC 27 ms
23,960 KB
testcase_08 AC 26 ms
24,216 KB
testcase_09 AC 27 ms
26,092 KB
testcase_10 AC 26 ms
23,916 KB
testcase_11 AC 28 ms
25,996 KB
testcase_12 AC 29 ms
22,196 KB
testcase_13 AC 28 ms
23,960 KB
testcase_14 AC 26 ms
23,912 KB
testcase_15 AC 27 ms
24,216 KB
testcase_16 AC 29 ms
24,216 KB
testcase_17 AC 28 ms
26,204 KB
testcase_18 AC 29 ms
23,832 KB
testcase_19 AC 30 ms
24,236 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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{
    public static void Main(){
        
        var inpt = Console.ReadLine().Split();
        long n = long.Parse(inpt[0]),  m = long.Parse(inpt[1]);
        
        inpt  = Console.ReadLine().Split();
        string op = inpt[0];
        
        long[] horizontal = new long[m];
        for(int i=1;i<m+1;i++){
            horizontal[i-1] = long.Parse(inpt[i]);
        }
        
        long[] vertical = new long[n];
        for(int i=0;i<n;i++){
            vertical[i] = long.Parse(Console.ReadLine());
        }
        
        long[] tmp = new long[m];
        
        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                if(op=="+")
                    tmp[j] = vertical[i] + horizontal[j];
                else
                    tmp[j] = vertical[i] * horizontal[j];
            }
            
            Console.WriteLine(string.Join(" ", tmp));
        }



        
    }
}
0