結果
問題 |
No.987 N×Mマス計算(基本)
|
ユーザー |
|
提出日時 | 2020-03-21 13:53:10 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 403 bytes |
コンパイル時間 | 3,056 ms |
コンパイル使用メモリ | 196,292 KB |
最終ジャッジ日時 | 2025-01-09 09:04:45 |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 WA * 5 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ cin.tie(0),ios::sync_with_stdio(false); int n,m; cin>>n>>m; char op; cin>>op; vector<int>a(n),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<<"\n"s; else cout<<" "s; } } }