結果
| 問題 | 
                            No.648  お や す み 
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2018-02-10 14:03:35 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 334 bytes | 
| コンパイル時間 | 666 ms | 
| コンパイル使用メモリ | 67,368 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-10-13 09:43:06 | 
| 合計ジャッジ時間 | 2,733 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 69 WA * 15 | 
ソースコード
#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;
    int  a = t;
    if((t - a) == 0)
        cout << "YES" <<endl << t <<endl;
    else
        cout << "NO" << endl;
    return 0;
}