結果
問題 | No.1058 素敵な数 |
ユーザー | fura |
提出日時 | 2020-05-22 21:27:55 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 19 ms / 2,000 ms |
コード長 | 373 bytes |
コンパイル時間 | 2,335 ms |
コンパイル使用メモリ | 198,008 KB |
最終ジャッジ日時 | 2025-01-10 14:13:34 |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 9 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:15:21: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 15 | int n; scanf("%d",&n); n--; | ~~~~~^~~~~~~~~
ソースコード
#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; }