結果
| 問題 | 
                            No.634 硬貨の枚数1
                             | 
                    
| コンテスト | |
| ユーザー | 
                             Bioinfo_K
                         | 
                    
| 提出日時 | 2018-01-19 23:09:50 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 398 bytes | 
| コンパイル時間 | 263 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-12-25 19:40:44 | 
| 合計ジャッジ時間 | 4,406 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 9 WA * 66 | 
ソースコード
import sys,math,collections;sys.setrecursionlimit(10**7)
from operator import itemgetter
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()
def tri(n):
    return (math.sqrt(1+8*n)-1)//2
n = I()
ans = 0
while n:
    t = tri(n)
    ans += 1
    n -= (t*(t+1))/2
print(ans)
            
            
            
        
            
Bioinfo_K