結果
| 問題 |
No.634 硬貨の枚数1
|
| コンテスト | |
| ユーザー |
Bioinfo_K
|
| 提出日時 | 2018-01-19 22:54:37 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 404 bytes |
| コンパイル時間 | 145 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2024-12-25 19:38:39 |
| 合計ジャッジ時間 | 4,133 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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 = n-t*(t+1)//2
print(int(ans))
Bioinfo_K