結果
| 問題 | No.1058 素敵な数 |
| コンテスト | |
| ユーザー |
milanis48663220
|
| 提出日時 | 2020-05-22 21:31:12 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 618 bytes |
| 記録 | |
| コンパイル時間 | 703 ms |
| コンパイル使用メモリ | 85,060 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-05 15:27:12 |
| 合計ジャッジ時間 | 1,166 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 9 |
ソースコード
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <queue>
#include <set>
#include <map>
using namespace std;
typedef long long ll;
bool ok[300001];
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
cout << setprecision(10) << fixed;
for(int i = 1; i <= 300000; i++) ok[i] = true;
for(int i = 2; i <= 100000; i++){
for(int j = 1; i*j <= 300000; j++){
ok[i*j] = false;
}
}
vector<int> v;
for(int i = 1; i <= 300000; i++){
if(ok[i]) v.push_back(i);
}
int N;
cin >> N;
cout << v[N-1] << endl;
}
milanis48663220