結果
| 問題 | No.1058 素敵な数 |
| コンテスト | |
| ユーザー |
a01sa01to
|
| 提出日時 | 2025-11-20 00:37:08 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 615 bytes |
| コンパイル時間 | 3,049 ms |
| コンパイル使用メモリ | 284,060 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2025-11-20 00:37:12 |
| 合計ジャッジ時間 | 4,206 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 9 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using ull = unsigned long long;
int main() {
cin.tie(nullptr)->sync_with_stdio(false);
constexpr array<ll, 10> p = { 100003, 100019, 100043, 100049, 100057, 100069, 100103, 100109, 100129, 100151 };
vector<ll> arr;
arr.push_back(1);
for (ll x : p) {
for (ll y : p) {
arr.push_back(x * y);
}
}
sort(arr.begin(), arr.end());
arr.erase(unique(arr.begin(), arr.end()), arr.end());
int n;
cin >> n;
assert(arr.size() > n);
cout << arr[n - 1] << '\n';
return 0;
}
a01sa01to