結果
| 問題 | 
                            No.1459 スマホを落としたいだけなのに
                             | 
                    
| コンテスト | |
| ユーザー | 
                             Nachia
                         | 
                    
| 提出日時 | 2021-03-31 22:24:58 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 294 bytes | 
| コンパイル時間 | 3,675 ms | 
| コンパイル使用メモリ | 190,624 KB | 
| 最終ジャッジ日時 | 2025-01-20 03:53:24 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 6 | 
| other | AC * 20 WA * 10 | 
ソースコード
#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(){
  int N; cin>>N;
  int l=0, r=40000;
  while(r-l>1){
    int m=(l+r)/2;
    if(m*(m+1)/2>=N) r=m; else l=m;
  }
  cout<<r<<"\n";
  return 0;
}
            
            
            
        
            
Nachia