/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Wrong Answer 9ms 1.469 MiB
#3 Wrong Answer 9ms 1.484 MiB

Code

#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define endl '\n'

int32_t main()
{   
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int t; cin >> t;
    while(t--) {
        ll n; cin >> n;
        ll arr[n+1];
        arr[0] = 3;
        int pwr = 3;
        for (int i = 1; i <= n; i++) {
            arr[i] = arr[i-1] + pwr;
            pwr++;
        }
        for (int i = 1; i <= n; i++) {
            cout << arr[i] << " "; 
        }
        cout << endl;
    }
    return 0;
} 

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 18:18:44
Judged At
2024-11-11 03:22:20
Judged By
Score
10
Total Time
9ms
Peak Memory
1.484 MiB