結果
| 問題 |
No.1459 スマホを落としたいだけなのに
|
| コンテスト | |
| ユーザー |
e869120
|
| 提出日時 | 2021-03-31 21:27:42 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 423 bytes |
| コンパイル時間 | 767 ms |
| コンパイル使用メモリ | 82,200 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-15 15:11:17 |
| 合計ジャッジ時間 | 1,777 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 6 |
| other | AC * 30 |
ソースコード
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <vector>
#include <string>
#include <algorithm>
#include <functional>
using namespace std;
#pragma warning (disable: 4996)
long long N, minx = (1LL << 30);
int main() {
cin >> N;
for (long long i = 1; i <= 100000; i++) {
long long border = i * (i + 1LL) / 2LL;
if (border >= N) minx = min(minx, i);
}
cout << minx << endl;
return 0;
}
e869120