結果

問題 No.3159 Just Answer 10 Integers!
ユーザー umezo
提出日時 2025-05-24 06:56:20
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 521 bytes
コンパイル時間 3,528 ms
コンパイル使用メモリ 275,396 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2025-05-24 06:56:25
合計ジャッジ時間 4,490 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 8 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

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

#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(v) v.begin(),v.end()
typedef long long ll;
template <class T> using V=vector<T>;
template <class T> using VV=V<V<T>>;

int main(){
  ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  
  V<int> P={2,3,5,7,11,13,17,19,21};
  int n;
  cin>>n;
  V<int> S(n);
  S[0]=1;
  rep(i,n-1) S[0]*=P[i];
  for(int i=1;i<n;i++) S[i]=S[0]/P[i-1];
  rep(i,n){
    if(i) cout<<" ";
    cout<<S[i];
  }
  cout<<endl;

  return 0;
}
0