結果

問題 No.648  お や す み 
ユーザー aaaaaaiu
提出日時 2019-08-19 22:49:18
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 195 bytes
コンパイル時間 1,844 ms
コンパイル使用メモリ 192,604 KB
最終ジャッジ日時 2025-01-07 14:18:06
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 53 WA * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
    ll n;
    cin>>n;
    ll x=sqrt(2*n);
    if (x*(x+1)/2==n) puts("YES");
    else puts("NO");
    return 0;
}
0