結果

問題 No.537 ユーザーID
ユーザー umezo
提出日時 2022-07-23 05:54:26
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 16 ms / 2,000 ms
コード長 615 bytes
コンパイル時間 2,870 ms
コンパイル使用メモリ 206,464 KB
最終ジャッジ日時 2025-01-30 13:13:56
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(v) v.begin(),v.end()
typedef long long ll;
 
#include<bits/stdc++.h>
using namespace std;

vector<ll> divisor(ll x){
  set<ll> s;
  for(ll i=1;i*i<=x;i++){
    if(x%i==0){
      s.insert(i);
      s.insert(x/i);
    }
  }
  vector<ll> res;
  for(auto y:s) res.push_back(y);
  return res;
}

int main(){
  ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  
  ll n;
  cin>>n;
  vector<ll> A=divisor(n);
  set<string> s;
  for(auto a:A){
    string b=to_string(a);
    string c=to_string(n/a);
    s.insert(b+c);
  }
  cout<<s.size()<<endl;

  return 0;
}
0