結果
| 問題 | 
                            No.1058 素敵な数
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2022-10-24 11:26:32 | 
| 言語 | C++17(clang)  (17.0.6 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 588 bytes | 
| コンパイル時間 | 3,313 ms | 
| コンパイル使用メモリ | 129,888 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-02 14:54:16 | 
| 合計ジャッジ時間 | 1,976 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 2 WA * 7 | 
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
LL P[]{
        100003,
        100019,
        100043,
        100049,
        100057,
        100069,
        100103,
        100109,
        100129,
        100151,
};
int main() {
    int N;
    cin >> N;
    vector<LL> ans;
    ans.push_back(1);
    for (int i = 0; i < 10; i++) {
        for (int j = 0; j < 10; j++) {
            ans.push_back(P[i] * P[j]);
        }
    }
    sort(ans.begin(), ans.end());
    cout << ans[N - 1] << endl;
}