結果
問題 |
No.987 N×Mマス計算(基本)
|
ユーザー |
|
提出日時 | 2020-04-12 00:36:54 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 666 bytes |
コンパイル時間 | 521 ms |
コンパイル使用メモリ | 64,384 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-19 18:37:37 |
合計ジャッジ時間 | 1,299 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 18 |
ソースコード
#include <iostream> using namespace std; int main() { int n, m; cin >> n >> m; char op; cin >> op; int a[n], b[m]; for (int i = 0; i < m; i++) cin >> b[i]; for (int i = 0; i < n; i++) cin >> a[i]; for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { switch (op) { case '+': cout << (a[i] + b[j]) << endl;; break; case '*': cout << (a[i] * b[j]) << endl;; break; } if (j < m - 1) cout << " " << endl; } cout << endl; } return 0; }