結果
| 問題 | No.648 お や す み |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-12-17 23:30:35 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 369 bytes |
| 記録 | |
| コンパイル時間 | 176 ms |
| コンパイル使用メモリ | 81,920 KB |
| 実行使用メモリ | 115,200 KB |
| 最終ジャッジ日時 | 2024-11-17 07:38:57 |
| 合計ジャッジ時間 | 25,119 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 39 WA * 43 TLE * 2 |
ソースコード
import sys
if sys.platform =='ios':
import clipboard
a=clipboard.get()
a = a.split('\n')
text = '\n'.join(a)
with open('input_file.txt','w') as f:
f.write(text)
sys.stdin = open('input_file.txt')
n = int(input())
if n >= 10**18:
exit(print("NO"))
ans = 0
for i in range(int((n)**0.5),n//2):
ans = i*(i+1)//2
if ans == n:
exit(print("YES",i,sep="\n"))