結果

問題 No.1058 素敵な数
ユーザー furafura
提出日時 2020-05-22 21:27:55
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 373 bytes
コンパイル時間 2,756 ms
コンパイル使用メモリ 200,876 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-15 15:47:46
合計ジャッジ時間 3,322 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 3 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 3 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;
using lint=long long;

int main(){
	lint P[]={100003,100019,100043,100049,100057,100069,100103,100109,100129};
	vector<lint> ans={1};
	rep(i,9) rep(j,i+1) ans.emplace_back(P[i]*P[j]);

	sort(ans.begin(),ans.end());

	int n; scanf("%d",&n); n--;
	printf("%lld\n",ans[n]);

	return 0;
}
0