没什么好说的。#include <cstdio> #include <cstring> #include <set> #include <vector> #include <algorithm> #include <string> #include <map> #include <iostream> #include <iomanip> #include <list> using namespace std; typedef long long ll; int MAIN() { ll n, k; cin >> n >> k; ll res = 1ll * (5 + (n - 1) * 6) * k; cout << res << endl; for (ll i = 1; i <= n; ++ i) { ll a, b, c, d; a = 1 + (i - 1) * 6; b = a + 1; c = b + 1; d = c + 2; cout << a * k << " " << b * k << " " << c * k << " " << d * k << endl; } return 0; } int main() { ios::sync_with_stdio(false); cout << fixed << setprecision(16); return MAIN(); }
477 B. Dreamoon and Sets
最新推荐文章于 2021-05-12 23:22:17 发布