結果
問題 |
No.3159 Just Answer 10 Integers!
|
ユーザー |
![]() |
提出日時 | 2025-05-23 19:56:48 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 783 bytes |
コンパイル時間 | 955 ms |
コンパイル使用メモリ | 108,316 KB |
実行使用メモリ | 7,844 KB |
最終ジャッジ日時 | 2025-05-23 19:57:01 |
合計ジャッジ時間 | 1,555 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 9 |
ソースコード
#include <iostream> #include <iomanip>//小数点出力用 //cout << fixed << setprecision(10) << ans; #include <cmath> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <set> #include <unordered_set> #include <map> using ll = long long; using namespace std; #define modP7 1'000'000'007 #define modP 998244353 bool chkrng0idx(int pos, int sup) { return (0 <= pos && pos < sup); } int clk4(int num) { return (num - 2) * (num % 2); } void yn(bool tf) { cout << (tf ? "Yes\n" : "No\n"); } int main() { int N; cin >> N; int p[10] = { 2,3,5,7,11,13,17,19,23 }; int r = 1; for (int i = 0;i < N - 1;i++) { r *= p[i]; } cout << r; for (int i = 0;i < N - 1;i++) { cout << " " << r / p[i]; } return 0; }