結果
問題 |
No.3159 Just Answer 10 Integers!
|
ユーザー |
|
提出日時 | 2025-05-23 20:25:18 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 1,990 bytes |
コンパイル時間 | 3,834 ms |
コンパイル使用メモリ | 252,100 KB |
実行使用メモリ | 7,844 KB |
最終ジャッジ日時 | 2025-05-23 20:25:40 |
合計ジャッジ時間 | 4,469 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 9 |
ソースコード
// #ifndef ONLINE_JUDGE // #define _GLIBCXX_DEBUG 1 //[]で配列外参照をするとエラーにしてくれる。上下のやつがないとTLEになるので注意 ABC311Eのサンプル4みたいなデバック中のTLEは防げないので注意 // #endif #ifdef ONLINE_JUDGE #define NDEBUG #include <atcoder/all> #endif #include <bits/stdc++.h> using namespace atcoder; using namespace std; using ll = long long; using ld = long double; ll INF = 2e18; using P = pair<ll, ll>; #define pb push_back #define rep(i, n) for (ll i = 0; i < (n); i++) #define reprev(i, n) for (ll i = (n) - 1; i >= 0; i--) #define reps(i, n) for (ll i = 1; i <= (n); i++) #define for_(i, a, b) for (ll i = (a); i < (b); i++) #define all(v) v.begin(), v.end() template <typename T> inline bool chmin(T &a, const T &b) { bool c = a > b; if (c) a = b; return c; } template <typename T> inline bool chmax(T &a, const T &b) { bool c = a < b; if (c) a = b; return c; } template <typename T> inline T ceil(T a, T b) { return (a + (b - 1)) / b; } using mint = modint998244353; // using mint = modint1000000007; // using mint = static_modint<10>;//使うときはコメントアウトを外す template <typename T> using vc = vector<T>; template <class T> istream &operator>>(istream &i, vc<T> &v) { rep(j, (ll)size(v)) i >> v[j]; return i; } template <class T> ostream &operator<<(ostream &o, const vc<T> &v) { rep(j, (ll)size(v)) { if (j) o << " "; o << v[j]; } o << endl; return o; } void solve() { vc<ll> primes = {2, 3, 5, 7, 11, 13, 17, 19, 23}; vc<ll> ans; ll all_product = 1; rep(i, primes.size()) { all_product *= primes[i]; } rep(i, primes.size()) { ans.pb(all_product / primes[i]); } ll N; cin >> N; ans.pb(all_product); ans.resize(N); cout << ans << endl; } int main() { cin.tie(nullptr); ios_base::sync_with_stdio(false); // ref:https://rsk0315.hatenablog.com/entry/2020/05/09/170315 solve(); return 0; }