結果
問題 |
No.648 お や す み
|
ユーザー |
|
提出日時 | 2018-02-09 22:43:49 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 344 bytes |
コンパイル時間 | 901 ms |
コンパイル使用メモリ | 72,880 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-08 16:37:58 |
合計ジャッジ時間 | 2,690 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 69 WA * 15 |
ソースコード
#include <iostream> #include <algorithm> #include <vector> #include <cmath> using namespace std; int main(){ long n; cin >> n; if(round(sqrt(n * 8 + 1)) * round(sqrt(n * 8 + 1)) == n * 8 + 1){ cout << "YES" << endl; cout << (round(sqrt(n * 8 + 1)) - 1) / 2 << endl; }else{ cout << "NO" << endl; } }