結果
問題 |
No.1162 Many Quotients hard
|
ユーザー |
![]() |
提出日時 | 2024-02-12 04:25:41 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 802 bytes |
コンパイル時間 | 3,783 ms |
コンパイル使用メモリ | 251,624 KB |
最終ジャッジ日時 | 2025-02-19 05:32:24 |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | AC * 7 WA * 35 |
ソースコード
#include <bits/stdc++.h> #include<atcoder/all> using namespace atcoder; using namespace std; using ll=long long; using ld=long double; ld pie=3.141592653589793; ll mod=998244353; ll inf=1000000000000000001;//10^17 int main(){ ll now=1; ll n; cin >> n; if (n==1) { cout << 1 << endl; return 0; } if (n>=500000000000000000) { now=500000000443288741; for (ll i = 1414213561; i >=0; i++) { if (now>=n) { cout << i << endl; return 0; } now+=i/2+1; } } for (int i = 2; i >=0; i++) { now+=i/2+1; if (now>=n) { cout << i << endl; cout << now << endl; return 0; } } }