結果
問題 | No.537 ユーザーID |
ユーザー |
|
提出日時 | 2017-06-30 22:24:21 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 14 ms / 2,000 ms |
コード長 | 428 bytes |
コンパイル時間 | 1,051 ms |
コンパイル使用メモリ | 79,856 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-04 19:20:41 |
合計ジャッジ時間 | 1,714 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 32 |
ソースコード
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <set> int main() { long long n; std::cin >> n; int ans = 0; std::set<std::string> st; for (long long i = 1; i * i <= n; i++) { if (n % i == 0) { st.insert(std::to_string(i) + std::to_string(n / i)); if (i * i != n) { st.insert(std::to_string(n / i) + std::to_string(i)); } } } std::cout << st.size() << std::endl; }