結果

問題 No.537 ユーザーID
ユーザー hatsuka_iwa
提出日時 2021-02-11 00:37:32
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 16 ms / 2,000 ms
コード長 383 bytes
コンパイル時間 1,768 ms
コンパイル使用メモリ 175,764 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-08 11:47:06
合計ジャッジ時間 2,969 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
  int64_t N, ans = 0;
  cin >> N;
  set<string> t;

  for (int i = 1; i <= (int64_t)sqrt(N); i++) {
    string s, r;
    if (N % i == 0) {
      s = to_string(i);
      s += to_string(N / i);
      r = to_string(N / i);
      r += to_string(i);
      t.insert(s);
      t.insert(r);
    }
  }

  cout << t.size() << endl;
}
0