結果
問題 | No.537 ユーザーID |
ユーザー |
![]() |
提出日時 | 2017-07-08 04:31:47 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 12 ms / 2,000 ms |
コード長 | 421 bytes |
コンパイル時間 | 733 ms |
コンパイル使用メモリ | 62,780 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-06 11:38:09 |
合計ジャッジ時間 | 1,561 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 32 |
ソースコード
#include<iostream> #include<string> #include<set> using namespace std; set<long long> st; long long F(long long x){ long long t=1; while(x>=t)t*=10; return t; } int main(){ long long n; cin>>n; for(long long i=1;i*i<=n;i++){ if(n%i==0){ long long a=i,b=n/i; if(st.find(a*F(b)+b)==st.end())st.insert(a*F(b)+b); if(st.find(a+b*F(a))==st.end())st.insert(a+b*F(a)); } }cout<<st.size()<<endl; return 0; }