結果
問題 | No.537 ユーザーID |
ユーザー |
|
提出日時 | 2025-01-14 12:36:00 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 22 ms / 2,000 ms |
コード長 | 464 bytes |
コンパイル時間 | 783 ms |
コンパイル使用メモリ | 67,224 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-01-14 12:36:03 |
合計ジャッジ時間 | 2,639 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 32 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:19:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 19 | scanf("%lld",&n); | ~~~~~^~~~~~~~~~~
ソースコード
#include<iostream> #include<set> #define rep(i,n) for(i=0;i<(int)(n);i++) using namespace std; typedef long long ll; typedef unsigned long long ull; ll n; ll cal(ll a,ll b){ ll ten=1; while(ten<=b)ten*=10; //printf("%lld\n",a*ten+b); return a*ten+b; } int main(){ int i; scanf("%lld",&n); set<ll> cnt; for(i=1;i<=n/i;i++)if(n%i==0)cnt.insert(cal(i,n/i)),cnt.insert(cal(n/i,i)); printf("%d\n",(int)cnt.size()); return 0; }