/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 320.0 KiB
#2 Wrong Answer 15ms 944.0 KiB
#3 Wrong Answer 15ms 1.066 MiB
#4 Wrong Answer 15ms 1.043 MiB
#5 Wrong Answer 15ms 1.047 MiB
#6 Wrong Answer 15ms 1.062 MiB
#7 Wrong Answer 15ms 1.062 MiB
#8 Wrong Answer 15ms 1.062 MiB
#9 Wrong Answer 28ms 1.477 MiB
#10 Wrong Answer 15ms 1.242 MiB

Code

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

int main(){
  int t;
  cin >> t;
  while (t--){
    int n, ans = 0;
    cin >> n;
    //vector<int> a(n + 2), vis(n + 2);
    cout << "6 10 15 ";
    for (int i = 18, j = 4; j <= n; i += 3){
      int x = __gcd(6, i);
      int y = __gcd(10, i);
      int z = __gcd(15, i);
      if (x > 1 && y > 1 && z > 1){
        cout << i << ' ';
        j++;
      }
    }
    cout << endl;
  }
}

Information

Submit By
Type
Submission
Problem
P1070 Strange Sequences
Contest
Brain Booster #4
Language
C++17 (G++ 13.2.0)
Submit At
2024-07-14 17:25:35
Judged At
2024-10-03 13:36:11
Judged By
Score
10
Total Time
28ms
Peak Memory
1.477 MiB