結果
問題 | No.987 N×Mマス計算(基本) |
ユーザー |
![]() |
提出日時 | 2023-07-25 13:55:35 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 617 bytes |
コンパイル時間 | 769 ms |
コンパイル使用メモリ | 105,796 KB |
最終ジャッジ日時 | 2025-02-15 18:58:15 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
#include<iostream> #include<string> #include<algorithm> #include<cctype> #include<set> #include<bitset> #include<math.h> #include<map> #include<queue> #include<iomanip> using namespace std; int main(){ long long a, n, m; string op, delim = ""; cin >> n >> m >> op; vector<int> b(m); for (int i = 0; i < m; i++) cin >> b[i]; for (int i = 0; i < n; i++){ cin >> a; for (int j = 0; j < m; j++){ if (op == "+") cout << delim << a + b[j]; else cout << delim << a * b[j]; delim = " "; } cout << endl; delim = ""; } }