結果
| 問題 | 
                            No.648  お や す み 
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2024-12-25 03:09:37 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 409 bytes | 
| コンパイル時間 | 325 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 21,504 KB | 
| 最終ジャッジ日時 | 2024-12-25 03:11:00 | 
| 合計ジャッジ時間 | 79,209 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 62 TLE * 22 | 
ソースコード
def main():
    inp1 = int(input())
    count = 0
    sec = 1
    sums = 0
    loop_flg = True
    while loop_flg:
        if inp1 == sums:
            print("YES")
            print(count)
            break
        elif inp1 < sums:
            print("NO")
            break
        else:
            pass
        sums = sums + sec
        sec += 1
        count += 1
if __name__ == '__main__':
    main()