結果

問題 No.537 ユーザーID
ユーザー oooooba
提出日時 2021-03-06 19:42:23
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 14 ms / 2,000 ms
コード長 661 bytes
コンパイル時間 1,027 ms
コンパイル使用メモリ 120,592 KB
最終ジャッジ日時 2025-01-19 12:26:47
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <array>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <optional>
#include <queue>
#include <sstream>
#include <unordered_map>
#include <unordered_set>
#include <vector>

using namespace std;

int main() {
    int64_t n;
    cin >> n;
    unordered_set<string> st;
    for (int64_t i = 1; i * i <= n; ++i) {
        if (n % i != 0)
            continue;
        string s1 = to_string(i) + to_string(n / i);
        string s2 = to_string(n / i) + to_string(i);
        st.insert(s1);
        st.insert(s2);
    }
    cout << st.size() << endl;
    return 0;
}
0