結果
問題 |
No.648 お や す み
|
ユーザー |
![]() |
提出日時 | 2018-02-10 18:05:06 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1,515 ms / 2,000 ms |
コード長 | 337 bytes |
コンパイル時間 | 549 ms |
コンパイル使用メモリ | 59,328 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-13 21:10:09 |
合計ジャッジ時間 | 34,246 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 84 |
ソースコード
#include<iostream> #include<vector> #include<utility> #include<algorithm> #include<cstring> using namespace std; typedef long long ll; int main(){ ll n,i=1; cin>> n; while(1){ ll k = i*i+i-2*n; if(k==0){ cout<<"YES"<<"\n"<<i; break; }else if(k>0){ cout<<"NO"<<"\n"; break; } i++; } }