結果
問題 |
No.648 お や す み
|
ユーザー |
|
提出日時 | 2019-10-06 15:21:22 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 236 bytes |
コンパイル時間 | 1,668 ms |
コンパイル使用メモリ | 166,108 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-10 02:57:30 |
合計ジャッジ時間 | 3,973 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 79 WA * 5 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin>>n; long long x = sqrt(1 + 8 * n); if (x * x != 1 + 8 * n) { cout<<"NO"<<endl; return 0; } cout<<"YES"<<endl; cout<<(-1 + x) / 2<<endl; }