結果
問題 | No.537 ユーザーID |
ユーザー | ohreitetsu |
提出日時 | 2017-11-19 16:35:52 |
言語 | C++11 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 12 ms / 2,000 ms |
コード長 | 435 bytes |
コンパイル時間 | 657 ms |
コンパイル使用メモリ | 69,504 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-05-04 12:07:29 |
合計ジャッジ時間 | 1,695 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 1 ms
5,376 KB |
testcase_02 | AC | 1 ms
5,376 KB |
testcase_03 | AC | 2 ms
5,376 KB |
testcase_04 | AC | 1 ms
5,376 KB |
testcase_05 | AC | 1 ms
5,376 KB |
testcase_06 | AC | 1 ms
5,376 KB |
testcase_07 | AC | 1 ms
5,376 KB |
testcase_08 | AC | 1 ms
5,376 KB |
testcase_09 | AC | 2 ms
5,376 KB |
testcase_10 | AC | 1 ms
5,376 KB |
testcase_11 | AC | 2 ms
5,376 KB |
testcase_12 | AC | 1 ms
5,376 KB |
testcase_13 | AC | 1 ms
5,376 KB |
testcase_14 | AC | 1 ms
5,376 KB |
testcase_15 | AC | 2 ms
5,376 KB |
testcase_16 | AC | 1 ms
5,376 KB |
testcase_17 | AC | 1 ms
5,376 KB |
testcase_18 | AC | 6 ms
5,376 KB |
testcase_19 | AC | 8 ms
5,376 KB |
testcase_20 | AC | 8 ms
5,376 KB |
testcase_21 | AC | 5 ms
5,376 KB |
testcase_22 | AC | 8 ms
5,376 KB |
testcase_23 | AC | 6 ms
5,376 KB |
testcase_24 | AC | 3 ms
5,376 KB |
testcase_25 | AC | 9 ms
5,376 KB |
testcase_26 | AC | 9 ms
5,376 KB |
testcase_27 | AC | 7 ms
5,376 KB |
testcase_28 | AC | 6 ms
5,376 KB |
testcase_29 | AC | 12 ms
5,376 KB |
testcase_30 | AC | 10 ms
5,376 KB |
testcase_31 | AC | 3 ms
5,376 KB |
testcase_32 | AC | 5 ms
5,376 KB |
testcase_33 | AC | 10 ms
5,376 KB |
testcase_34 | AC | 7 ms
5,376 KB |
コンパイルメッセージ
main.cpp: In function ‘int main(int, char**)’: main.cpp:18:38: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘UL’ {aka ‘long long unsigned int’} [-Wformat=] 18 | sprintf(d,"%lu%lu",y,i); | ~~^ ~ | | | | | UL {aka long long unsigned int} | long unsigned int | %llu main.cpp:18:41: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘UL’ {aka ‘long long unsigned int’} [-Wformat=] 18 | sprintf(d,"%lu%lu",y,i); | ~~^ ~ | | | | | UL {aka long long unsigned int} | long unsigned int | %llu main.cpp:20:38: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘UL’ {aka ‘long long unsigned int’} [-Wformat=] 20 | sprintf(d,"%lu%lu",i,y); | ~~^ ~ | | | | | UL {aka long long unsigned int} | long unsigned int | %llu main.cpp:20:41: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘UL’ {aka ‘long long unsigned int’} [-Wformat=] 20 | sprintf(d,"%lu%lu",i,y); | ~~^ ~ | | | |
ソースコード
#include <iostream> #include <string> #include <set> #include <math.h> using namespace std; typedef unsigned long long UL; int main(int argc, char* argv[]) { UL N; cin>>N; char d[100]; set<string> nSet; UL n=(UL)sqrt((double)N); for (UL i=1;i<=n;i++){ UL x=N%i; if (x==0){ UL y=N/i; sprintf(d,"%lu%lu",y,i); nSet.insert(d); sprintf(d,"%lu%lu",i,y); nSet.insert(d); } } cout<<nSet.size()<<endl; return 0; }