結果
| 問題 | No.537 ユーザーID | 
| コンテスト | |
| ユーザー |  data9824 | 
| 提出日時 | 2017-07-02 15:18:43 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 17 ms / 2,000 ms | 
| コード長 | 493 bytes | 
| コンパイル時間 | 875 ms | 
| コンパイル使用メモリ | 70,668 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-10-05 07:39:18 | 
| 合計ジャッジ時間 | 1,809 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 32 | 
コンパイルメッセージ
In file included from /usr/include/c++/11/backward/strstream:50,
                 from main.cpp:5:
/usr/include/c++/11/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]
   32 | #warning \
      |  ^~~~~~~
            
            ソースコード
#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;
}
            
            
            
        