結果
| 問題 |
No.987 N×Mマス計算(基本)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-03-01 06:05:05 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 28 ms / 2,000 ms |
| コード長 | 948 bytes |
| コンパイル時間 | 958 ms |
| コンパイル使用メモリ | 112,592 KB |
| 実行使用メモリ | 26,004 KB |
| 最終ジャッジ日時 | 2024-10-13 20:29:53 |
| 合計ジャッジ時間 | 2,179 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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));
}
}
}