結果
| 問題 |
No.1162 Many Quotients hard
|
| ユーザー |
|
| 提出日時 | 2020-08-12 11:06:53 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 215 bytes |
| コンパイル時間 | 839 ms |
| コンパイル使用メモリ | 77,796 KB |
| 最終ジャッジ日時 | 2025-01-12 21:15:48 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 42 |
ソースコード
// editorial
#include<iostream>
#include<cmath>
using namespace std;
typedef long long ll;
int main(){
ll n;
cin >> n;
ll t = sqrt(n);
if(t*t > n) t--;
cout << t+n/(t+1) << endl;
return 0;
}