結果

問題 No.648  お や す み 
ユーザー LightBells
提出日時 2018-03-06 17:11:07
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 266 bytes
コンパイル時間 2,205 ms
コンパイル使用メモリ 157,788 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-19 11:39:57
合計ジャッジ時間 3,494 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 80 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define eps 1e-9
using namespace std;

int main(){
	double n;
	cin >> n;
	double kai = (-1+sqrt(1+4*2*n))/2;
	double comp = double(int(kai));;
	if (abs(kai-comp)<=eps){
		printf("YES\n%.0f\n",kai);
	}
	else{
		printf("NO\n");
	}
	return 0;
}
0