/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 328.0 KiB
#2 Wrong Answer 16ms 1.348 MiB
#3 Wrong Answer 15ms 1.195 MiB
#4 Wrong Answer 15ms 1.195 MiB
#5 Wrong Answer 15ms 1.203 MiB
#6 Wrong Answer 16ms 1.133 MiB
#7 Wrong Answer 15ms 1.156 MiB
#8 Wrong Answer 15ms 1.16 MiB
#9 Wrong Answer 29ms 1.852 MiB
#10 Wrong Answer 15ms 1.191 MiB

Code

#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MOD = 1000000007;
#define sz(x) (ll)(x).size()
#define rd ({ll x; cin >> x; x; })
#define dbg(x) cerr << "[" #x "]  " << (x) << "\n\n"
// #define errv(x) {cerr << "["#x"]  ["; for (const auto& ___ : (x)) cerr << ___ << ", "; cerr << "]\n";}
// #define errvn(x, n) {cerr << "["#x"]  ["; for (auto ___ = 0; ___ < (n); ++___) cerr << (x)[___] << ", "; cerr << "]\n";}
// #define cerr if(0)cerr
#define xx first
#define yy second
mt19937 rnd(std::chrono::high_resolution_clock::now().time_since_epoch().count());
/*_________________________________________________________________________________________________________________________*/

void Solve()
{
    ll n;
    cin >> n;
    vector<ll> arr = { 6, 10, 15 };
    for (int i = 16; i <= 1e5; i++) {
        if (arr.size() == n)
            break;
        if (i % 6 == 0 || i % 15 == 0 || i % 10)
            arr.push_back(i);
    }
    // dbg(arr.back());
    // dbg(sz(arr));
    // return;
    for (auto& x : arr)
        cout << x << " ";
    cout << "\n";
}

int32_t main()
{
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int t = 1;
    cin >> t;
    for (int i = 1; i <= t; i++) {
        // cout << "Case #" << i << ": "; // cout << "Case " << i << ": ";
        Solve();
    }
    return 0;
}
// Coded by Tahsin Arafat (@TahsinArafat)

Information

Submit By
Type
Submission
Problem
P1070 Strange Sequences
Contest
Brain Booster #4
Language
C++20 (G++ 13.2.0)
Submit At
2024-07-14 16:30:18
Judged At
2024-10-03 13:37:36
Judged By
Score
10
Total Time
29ms
Peak Memory
1.852 MiB