結果

問題 No.648  お や す み 
ユーザー totori_nyaa
提出日時 2019-07-17 22:27:00
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 276 bytes
コンパイル時間 1,635 ms
コンパイル使用メモリ 166,728 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-23 12:13:11
合計ジャッジ時間 3,831 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 53 WA * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

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

signed main(){
    ios::sync_with_stdio(false);
	cin.tie(0);
 
    ll n;
    cin>>n;
    ll now=0;
    n*=2;
    ll t=sqrt(n);
    if(t*(t+1)==n){
        cout<<"YES"<<endl;
    }
    else cout<<"NO"<<endl;
}
0