結果
問題 |
No.987 N×Mマス計算(基本)
|
ユーザー |
![]() |
提出日時 | 2020-03-04 21:02:21 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 596 bytes |
コンパイル時間 | 1,584 ms |
コンパイル使用メモリ | 169,252 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-14 00:29:05 |
合計ジャッジ時間 | 2,279 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 18 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int n,m; string op; cin >> n >> m >> op; vector<int> a(n); vector<int> b(m); for(int i=0;i<m;i++){ cin >> b.at(i); } for(int i=0;i<n;i++){ cin >> a.at(i); } for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ if(op=="+"){ cout << a.at(i)+b.at(j); }else{ cout << a.at(i)*b.at(j); } if(j==m-1){ cout << endl; }else{ cout << ""; } } } }