結果

問題 No.537 ユーザーID
ユーザー troro_kelptroro_kelp
提出日時 2018-08-28 17:03:13
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 17 ms / 2,000 ms
コード長 1,458 bytes
コンパイル時間 879 ms
コンパイル使用メモリ 102,248 KB
実行使用メモリ 8,880 KB
最終ジャッジ日時 2023-09-23 02:13:20
合計ジャッジ時間 2,863 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4 ms
8,276 KB
testcase_01 AC 5 ms
8,216 KB
testcase_02 AC 4 ms
8,220 KB
testcase_03 AC 4 ms
8,292 KB
testcase_04 AC 4 ms
8,524 KB
testcase_05 AC 4 ms
8,484 KB
testcase_06 AC 4 ms
8,332 KB
testcase_07 AC 5 ms
8,652 KB
testcase_08 AC 4 ms
8,464 KB
testcase_09 AC 4 ms
8,160 KB
testcase_10 AC 4 ms
8,256 KB
testcase_11 AC 5 ms
8,316 KB
testcase_12 AC 4 ms
8,256 KB
testcase_13 AC 4 ms
8,420 KB
testcase_14 AC 4 ms
8,424 KB
testcase_15 AC 4 ms
8,464 KB
testcase_16 AC 4 ms
8,812 KB
testcase_17 AC 4 ms
8,596 KB
testcase_18 AC 12 ms
8,476 KB
testcase_19 AC 14 ms
8,464 KB
testcase_20 AC 13 ms
8,500 KB
testcase_21 AC 10 ms
8,520 KB
testcase_22 AC 14 ms
8,612 KB
testcase_23 AC 10 ms
8,480 KB
testcase_24 AC 6 ms
8,460 KB
testcase_25 AC 14 ms
8,516 KB
testcase_26 AC 15 ms
8,480 KB
testcase_27 AC 12 ms
8,460 KB
testcase_28 AC 10 ms
8,672 KB
testcase_29 AC 17 ms
8,880 KB
testcase_30 AC 15 ms
8,748 KB
testcase_31 AC 8 ms
8,468 KB
testcase_32 AC 8 ms
8,616 KB
testcase_33 AC 16 ms
8,760 KB
testcase_34 AC 11 ms
8,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <cmath>
#include <queue>
#include <numeric>
#include <climits>
#include <iterator>
#include <iomanip>
#include <stack>
#include <set>
#include <bitset>
#include <functional>
using namespace std;
const constexpr int INF = 1e9;
//typedef std::pair<std::string,double> P;


#define FOR(i, a, n) for (ll i = (ll)a; i<(ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)

typedef long long ll;
typedef vector<int> VI;
const constexpr ll MOD = 1e9+7;
vector<pair<int, int> > vp;
 
struct Less {
    bool operator()(const pair<int, int>& x, const pair<int, int>& y) const {
        return x.first > y.first;
    }
};

ll GCD(ll a, ll b){
    if(b==0) return a;
    return GCD(b, a%b);
}


//グラフの隣接リスト
VI g[200010];
//頂点の入次数を管理
int h[100010];
string s;
int a[100010];
int b[100010]={INF};
int main(void) {
    long long N; cin >> N;
    ll i=1;
    set<ll> st;
    for(; i*i<=N; ++i){
        if(N%i==0){
            ll temp= N/i;
            int digit_a = 0;
            while(temp){
                temp/=10; digit_a++;
            }
            temp = i;
            int digit_b = 0;
            while(temp){
                temp/=10; digit_b++;
            }
            ll a = N/i*pow(10, digit_b)+i;
            ll b = i*pow(10, digit_a) + N/i;
            st.insert(a); st.insert(b);
        }
    }
    cout << st.size() << endl;
}
0