結果
問題 | No.1459 スマホを落としたいだけなのに |
ユーザー |
👑 ![]() |
提出日時 | 2021-03-31 22:31:18 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 291 bytes |
コンパイル時間 | 1,896 ms |
コンパイル使用メモリ | 190,604 KB |
最終ジャッジ日時 | 2025-01-20 04:00:20 |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 6 |
other | AC * 30 |
ソースコード
#include <bits/stdc++.h>using namespace std;using ll=long long;using ull=unsigned long long;#define rep(i,n) for(int i=0; i<(n); i++)int main(){ll N; cin>>N;ll l=0, r=80000;while(r-l>1){ll m=(l+r)/2;if(m*(m+1)/2>=N) r=m; else l=m;}cout<<r<<"\n";return 0;}