結果
問題 |
No.648 お や す み
|
ユーザー |
|
提出日時 | 2018-02-10 14:05:32 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 340 bytes |
コンパイル時間 | 703 ms |
コンパイル使用メモリ | 68,096 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-13 21:06:28 |
合計ジャッジ時間 | 2,629 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 84 |
ソースコード
#include <iostream> #include <stdio.h> #include <stdlib.h> #include <math.h> using namespace std; int main(void) { long double t; long double n; cin >> n; t = (sqrtl(1+8*n)-1)/2; long long a = t; if((t - a) == 0) cout << "YES" <<endl << a <<endl; else cout << "NO" << endl; return 0; }