結果

問題 No.537 ユーザーID
ユーザー rankBBNT
提出日時 2017-07-04 21:30:51
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 353 bytes
コンパイル時間 436 ms
コンパイル使用メモリ 60,248 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-05 16:06:24
合計ジャッジ時間 1,281 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7 WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <math.h>
using namespace std;

int main(void){
    int N;
	cin >> N;

    int result = 0;
    
    // 平方数か判定
    int sqrtN = (int)floor(sqrt(N + 0.5));
    
    for (int i=1; i<=sqrtN; i++) {
        if (N%i==0) result+=2;
    }
    if (sqrtN*sqrtN == N) {
        result--;
    }

    cout << result << endl;
}
0