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