結果

問題 No.648  お や す み 
ユーザー dazy
提出日時 2018-05-07 17:59:57
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 312 bytes
コンパイル時間 1,327 ms
コンパイル使用メモリ 158,064 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-28 02:18:07
合計ジャッジ時間 3,684 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 53 WA * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "bits/stdc++.h"
#define fastcin {\
    cin.tie(0);\
    ios::sync_with_stdio(false);\
}
using namespace std;

int main() {
    fastcin;
    unsigned long long n;
    cin >> n;
    int a = (sqrt(n*8 +1) -1)/2;
    if((a*a +a -2*n)==0) cout << "YES" << '\n';
    else cout << "NO" << '\n';
    return 0;
}
0