結果

問題 No.648  お や す み 
ユーザー ciel
提出日時 2017-10-06 00:37:34
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 477 bytes
コンパイル時間 122 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 6,912 KB
最終ジャッジ日時 2024-11-16 21:33:57
合計ジャッジ時間 3,331 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 79 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python
import sys,ctypes
if sys.platform.startswith('linux'):
	libm=ctypes.cdll.LoadLibrary('libm.so.6')
elif sys.platform=='darwin':
	libm=ctypes.cdll.LoadLibrary('libSystem.dylib')
elif sys.platform=='win32':
	libm=ctypes.cdll.LoadLibrary('msvcr120.dll')
else:
	raise ImportError
sqrtl=lambda n:libm.sqrtl(ctypes.c_longdouble(n))
libm.sqrtl.restype=ctypes.c_longdouble
n=int(sys.stdin.readline())
n=sqrtl(8*n+1)
q=int(n)
print('NO' if q<n else 'YES\n%d'%(q/2))
0