結果
| 問題 |
No.3159 Just Answer 10 Integers!
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-05-23 19:27:30 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 643 bytes |
| コンパイル時間 | 4,837 ms |
| コンパイル使用メモリ | 335,040 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2025-05-23 19:27:37 |
| 合計ジャッジ時間 | 5,409 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 9 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll=long long;
ll gcd(ll x,ll y){
if(y==0)return x;
else return gcd(y,x%y);
}
int main()
{
int n;
cin>>n;
vector<ll> p={2,3,5,7,11,13,17,19,23};
ll t=1;
for(ll x:p)t*=x;
cout<<t;
for(int i=0;i<n-1;i++)cout<<" "<<t/p[i];
cout<<endl;
/* vector<ll> s;
s.push_back(t);
for(int i=0;i<9;i++)s.push_back(t/p[i]);
set<ll> ss;
for(int i=0;i<10;i++)for(int j=i+1;j<10;j++){
ll lcm=s[i]*s[j]/gcd(s[i],s[j]);
ss.insert(lcm);
}
cout<<ss.size()<<endl;
*/
return 0;
}