結果
| 問題 |
No.1162 Many Quotients hard
|
| ユーザー |
umezo
|
| 提出日時 | 2020-08-12 15:57:57 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 387 bytes |
| コンパイル時間 | 2,206 ms |
| コンパイル使用メモリ | 191,032 KB |
| 最終ジャッジ日時 | 2025-01-12 21:26:17 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 25 TLE * 17 |
ソースコード
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;
#include <bits/stdc++.h>
using namespace std;
int main(){
ll n;
cin>>n;
ll cnt=0,tmp,pre=-1;
for(ll i=1;i*i<=n;i++){
tmp=n/i;
if(tmp!=pre){
cnt++;
pre=tmp;
}
}
if(n/pre==pre) cout<<2*cnt-1<<endl;
else cout<<2*cnt<<endl;
return 0;
}
umezo