結果

問題 No.537 ユーザーID
ユーザー Mister
提出日時 2020-04-09 16:28:45
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 17 ms / 2,000 ms
コード長 514 bytes
コンパイル時間 3,147 ms
コンパイル使用メモリ 77,984 KB
最終ジャッジ日時 2025-01-09 15:28:28
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <set>

using lint = long long;

void solve() {
    lint n;
    std::cin >> n;

    std::set<std::string> ss;
    for (lint p = 1; p * p <= n; ++p) {
        if (n % p != 0) continue;
        ss.insert(std::to_string(p) + std::to_string(n / p));
        ss.insert(std::to_string(n / p) + std::to_string(p));
    }

    std::cout << ss.size() << std::endl;
}

int main() {
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);

    solve();

    return 0;
}
0