結果
問題 |
No.537 ユーザーID
|
ユーザー |
![]() |
提出日時 | 2017-06-11 16:51:21 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 603 bytes |
コンパイル時間 | 1,661 ms |
コンパイル使用メモリ | 167,816 KB |
実行使用メモリ | 13,640 KB |
最終ジャッジ日時 | 2024-10-04 16:59:27 |
合計ジャッジ時間 | 5,506 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 15 TLE * 1 -- * 16 |
ソースコード
#include <bits/stdc++.h> #define rep(i, a, n) for(int i = a; i < n; i++) #define int long long using namespace std; string change_to_s(int n){ stringstream ss; ss<<n; return ss.str(); } int solve(int n){ set<string> st; for(int i = 1; i <= n; i++){ if(n % i == 0){ st.insert(change_to_s(n / i) + change_to_s(i)); st.insert(change_to_s(i) + change_to_s(n / i)); // cout << change_to_s(n / i) + change_to_s(i) << " " << change_to_s(i) + change_to_s(n / i) << endl; } } return st.size(); } signed main(){ int n; cin >> n; assert(0 <= n && n <= (1e12)); cout << solve(n) << endl; }