結果
問題 |
No.648 お や す み
|
ユーザー |
![]() |
提出日時 | 2018-02-17 01:21:56 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 268 bytes |
コンパイル時間 | 431 ms |
コンパイル使用メモリ | 59,404 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-23 19:24:58 |
合計ジャッジ時間 | 2,624 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 53 WA * 31 |
ソースコード
#include<iostream> #include<math.h> using namespace std; // N=n(n+1)/2 // 2N=n(n+1) // -->(int)√N * (int)√N +1 ? int main(){ long long n; cin>>n; if((long long)sqrt(2*n)*((long long)sqrt(2*n)+1)==2*n) cout<<"YES"<<endl; else cout<<"NO"<<endl; }