結果

問題 No.537 ユーザーID
ユーザー LightBellsLightBells
提出日時 2017-07-12 22:01:11
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,110 bytes
コンパイル時間 2,463 ms
コンパイル使用メモリ 205,920 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-16 17:53:18
合計ジャッジ時間 3,312 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 2 ms
5,376 KB
testcase_11 AC 2 ms
5,376 KB
testcase_12 AC 2 ms
5,376 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 AC 2 ms
5,376 KB
testcase_15 AC 2 ms
5,376 KB
testcase_16 AC 2 ms
5,376 KB
testcase_17 AC 2 ms
5,376 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 2 ms
5,376 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

// No.537 ユーザーID
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define betw(i,a,b) for(int i=a;i<b;++i)
#define rrep(i,n) for (int i=n;^i;i--)
#define ALL(v) v.begin(),v.end()
// #define int ll 
#define eps 1e-9
#define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0]))

template<class T> inline void chmax(T &a, const T &b) { if(a < b) a = b; }
template<class T> inline void chmin(T &a, const T &b) { if(a > b) a = b; }
typedef long long ll;

inline string itos(int a,int b){
    stringstream ssa,ssb;
    ssa << a;
    ssb << b;
    return ssa.str()+ssb.str();
}

int main(void){
    int n;
    cin >> n;
    vector<pair<int,int> > pairs;
    betw(i,1,static_cast<int>(sqrt(n))+1){
        if (n%i==0){
            pair<int,int> temp(n/i,i);
            pairs.push_back(temp);
        }
    }

    set<string> sets;

    rep(i,pairs.size()){
        string a = itos(pairs.at(i).first,pairs.at(i).second);
        string b = itos(pairs.at(i).second,pairs.at(i).first);
        sets.insert(a);
        sets.insert(b);
    }

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