結果
問題 |
No.3159 Just Answer 10 Integers!
|
ユーザー |
![]() |
提出日時 | 2025-05-24 12:38:38 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 691 bytes |
コンパイル時間 | 3,282 ms |
コンパイル使用メモリ | 274,072 KB |
実行使用メモリ | 7,844 KB |
最終ジャッジ日時 | 2025-05-24 12:38:43 |
合計ジャッジ時間 | 4,121 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 9 |
ソースコード
#include<bits/stdc++.h> using namespace std; using ll = long long; //https://boostjp.github.io/tips/multiprec-int.html #define YES cout<<"Yes"<<endl #define NO cout<<"No"<<endl #define YN {cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}// if(a==b)YN; #define NO2 cout<<-1<<endl #define rep(i, n) for (int i = 0; i < (int)(n); ++i) #define rrep(i, n) for (int i=int(n)-1; i>=0; --i) #define all(a) a.begin(),a.end() #define rall(a) a.rbegin(),a.rend() int main() { int N; cin >> N; vector<int> P = {2, 3, 5, 7, 11, 13, 17, 19, 23}; ll prod = 1; rep(i, N-1) { prod *= P[i]; } cout << prod << ' '; rep(i, N-1) { cout << prod / P[i] << ' '; } }