結果
問題 |
No.537 ユーザーID
|
ユーザー |
|
提出日時 | 2017-07-14 03:27:11 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 565 bytes |
コンパイル時間 | 765 ms |
コンパイル使用メモリ | 72,700 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-07 19:28:02 |
合計ジャッジ時間 | 2,062 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 32 |
ソースコード
#include <iostream> #include <set> #include <vector> #include <cmath> #define LL long long using namespace std; string str(int il, int ir){ string ret = to_string(il); ret += to_string(ir); return ret; } int main () { LL n; cin >> n; set<string> myset; LL max = static_cast<LL>(sqrt(n) + 1); cout << max << endl; for (LL i = 1; i < max; ++i) { if (n % i != 0) continue; LL il = i; LL ir = n / i; myset.insert(str(il, ir)); myset.insert(str(ir, il)); cout << il << "," << ir << endl; } cout << myset.size() << endl; }