結果
| 問題 | No.634 硬貨の枚数1 |
| コンテスト | |
| ユーザー |
Bioinfo_K
|
| 提出日時 | 2018-01-19 22:54:37 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 404 bytes |
| 記録 | |
| コンパイル時間 | 456 ms |
| コンパイル使用メモリ | 20,552 KB |
| 実行使用メモリ | 15,456 KB |
| 最終ジャッジ日時 | 2026-05-31 12:26:22 |
| 合計ジャッジ時間 | 10,093 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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