結果
| 問題 | No.8035 2018 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-04-02 23:48:42 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 792 ms / 2,000 ms |
| コード長 | 587 bytes |
| コンパイル時間 | 286 ms |
| コンパイル使用メモリ | 23,040 KB |
| 実行使用メモリ | 48,500 KB |
| 最終ジャッジ日時 | 2024-06-26 06:52:55 |
| 合計ジャッジ時間 | 9,343 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:22:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
22 | scanf("%d",&N);
| ~~~~~^~~~~~~~~
ソースコード
#include <stdio.h>
#define N_MAX 6000000
long long dp[N_MAX];
int num_divisor(int n){
/*
int i=0,count=0,s=0;
for(i=1;i<=n;i++){
if(n%i==0){
s=s+i;
count++;
}
}
return count;*/
return dp[n];
}
int main(void){
int N;
scanf("%d",&N);
for(long long i = 1; i <= N_MAX; i++){
for(long long j = 1; j*i <= N_MAX; j++){
dp[j*i] += 1;
}
}
;
int count = 0;
int n = 0;
while(count != N){
if(num_divisor(++n) == 4) ++count;
}
printf("%d\n",n);
return 0;
}