結果

問題 No.1058 素敵な数
ユーザー misora192misora192
提出日時 2020-05-31 20:39:53
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 639 bytes
コンパイル時間 1,681 ms
コンパイル使用メモリ 171,268 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-29 10:16:49
合計ジャッジ時間 2,249 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 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 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for(int i=(0);i<(n);i++)

using namespace std;

typedef long long ll;
typedef long double ld;

template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);

	ll a[10] = {100003, 100019, 100043, 100049, 100057, 100069, 100103, 100109, 100129, 100151};
	set<ll> st;
	st.insert(1);
	rep(i, 10) rep(j, 10){
		st.insert(a[i] * a[j]);
	}

	int n;
	cin >> n;

	auto itr = st.begin();
	rep(i, n-1) itr++;

	cout << *itr << endl;
}	
0