結果
| 問題 | No.537 ユーザーID |
| コンテスト | |
| ユーザー |
Imperi_Night
|
| 提出日時 | 2018-08-29 03:34:41 |
| 言語 | C++11(廃止可能性あり) (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 686 bytes |
| 記録 | |
| コンパイル時間 | 549 ms |
| コンパイル使用メモリ | 69,224 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-07-19 04:54:04 |
| 合計ジャッジ時間 | 8,935 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 WA * 19 TLE * 2 -- * 5 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:37:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
37 | scanf("%d",&N);
| ~~~~~^~~~~~~~~
ソースコード
#include <cstdio>
#include <vector>
#include <map>
#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <set>
#define rep(i,N) for(int (i)=0;(i)<(N);(i)++)
#define MOD 1000000007
using namespace std;
int powmod(int a, int b, int p) {
if (b == 0)return 1;
else if (b % 2 == 0)return (powmod(a*a, b / 2, p) % p);
else return (powmod(a, b - 1, p)*a%p);
}
int factorialmod(int a, int p) {
if (!a)return 1;
else return a * factorialmod(a - 1, p) % p;
}
int count_factor(int N) {
int cnt = 0;
for (int i = 1; i <= N; i++) {
if (N%i == 0)cnt++;
}
return cnt;
}
int N;
int main(){
scanf("%d",&N);
printf("%d\n", count_factor(N));
return 0;
}
Imperi_Night