結果

問題 No.1162 Many Quotients hard
ユーザー umezo
提出日時 2020-08-12 15:42:19
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 418 bytes
コンパイル時間 2,092 ms
コンパイル使用メモリ 190,932 KB
最終ジャッジ日時 2025-01-12 21:24:59
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23 WA * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
  
  bool b=false;
  ll cnt=0,tmp,pre=-1;
  for(ll i=1;i*i<=n;i++){
    tmp=n/i;
    if(tmp!=pre){
      cnt++;
      tmp=pre;
    }
    if(i*i==n) b=true;
  }
  if(b) cout<<2*cnt-1<<endl;
  else cout<<2*cnt<<endl;
  
  return 0;
}
0