結果
| 問題 | No.648 お や す み |
| コンテスト | |
| ユーザー |
shooooo
|
| 提出日時 | 2019-11-27 00:55:42 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 94 ms / 2,000 ms |
| コード長 | 178 bytes |
| 記録 | |
| コンパイル時間 | 386 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 15,360 KB |
| 最終ジャッジ日時 | 2026-05-07 08:17:54 |
| 合計ジャッジ時間 | 10,164 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 84 |
ソースコード
import math
import sys
N=int(input())
num=int(math.sqrt(2*N))-1
while num*(num+1)<=2*N:
if num*(num+1)==2*N:
print('YES')
print(num)
sys.exit()
num+=1
print('NO')
shooooo