結果

問題 No.537 ユーザーID
ユーザー data9824
提出日時 2017-07-02 15:18:43
言語 C++11
(gcc 4.8.5)
結果
AC  
実行時間 20 ms
コード長 493 Byte
コンパイル時間 467 ms
使用メモリ 2,384 KB
最終ジャッジ日時 2018-07-13 03:39:09

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
sample1.txt AC 3 ms
1,544 KB
sample2.txt AC 3 ms
1,544 KB
sample3.txt AC 3 ms
1,548 KB
small1.txt AC 3 ms
1,548 KB
small2.txt AC 2 ms
1,548 KB
small3.txt AC 3 ms
1,548 KB
small4.txt AC 3 ms
1,548 KB
small5.txt AC 2 ms
1,548 KB
small6.txt AC 3 ms
1,544 KB
small7.txt AC 3 ms
1,544 KB
small8.txt AC 2 ms
1,548 KB
small9.txt AC 3 ms
1,548 KB
small10.txt AC 3 ms
1,544 KB
small11.txt AC 3 ms
1,544 KB
small12.txt AC 3 ms
1,548 KB
small13.txt AC 2 ms
1,548 KB
small14.txt AC 3 ms
1,548 KB
small15.txt AC 3 ms
1,552 KB
test1.txt AC 10 ms
1,556 KB
test2.txt AC 13 ms
1,548 KB
test3.txt AC 11 ms
1,544 KB
test4.txt AC 8 ms
1,552 KB
test5.txt AC 13 ms
1,552 KB
test6.txt AC 9 ms
1,596 KB
test7.txt AC 4 ms
1,548 KB
test8.txt AC 13 ms
1,568 KB
test9.txt AC 13 ms
1,568 KB
test10.txt AC 11 ms
1,556 KB
test11.txt AC 11 ms
2,060 KB
test12.txt AC 20 ms
2,384 KB
test13.txt AC 17 ms
2,316 KB
test14.txt AC 6 ms
1,580 KB
test15.txt AC 5 ms
1,560 KB
test16.txt AC 17 ms
1,936 KB
test17.txt AC 11 ms
1,592 KB
テストケース一括ダウンロード
コンパイルメッセージ
In file included from /usr/include/c++/4.8.2/backward/strstream:51:0,
                 from main.cpp:5:
/usr/include/c++/4.8.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]
 #warning \
  ^

ソースコード

diff #
#include <iostream>
#include <cmath>
#include <cstring>
#include <set>
#include <strstream>

using namespace std;

int main() {
	long long n;
	cin >> n;
	long long sqrn = (long long)sqrt(n);
	set<string> results;
	for (long long i = 1; i <= sqrn; ++i) {
		if (n % i == 0) {
			long long k = n / i;
			ostrstream str1, str2;
			str1 << i << k;
			str2 << k << i;
			results.insert(string(str1.str()));
			results.insert(string(str2.str()));
		}
	}
	cout << results.size() << endl;
	return 0;
}
0