結果

問題 No.537 ユーザーID
ユーザー teketeke5000
提出日時 2017-08-18 00:58:18
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 379 bytes
コンパイル時間 1,451 ms
コンパイル使用メモリ 160,304 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-14 14:00:39
合計ジャッジ時間 2,706 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main(void) {
    ll N,i;
    int ans = 2;
    cin >> N;
    if (N == 1) {
        cout << N <<endl;
        return 0;
    }
    ll stop = floor(sqrt(N));
    for (i = 2; i <= stop; i++) if (N % i == 0) {
        ans += 2;
        if (N == stop * stop) ans--;
    }
    cout << ans << endl;
    return 0;
}
0