提出 #23964200
ソースコード 拡げる
import math
p = int(input())
f = []
v = 1
for i in range(1, 11):
v *= i
f += [v]
res = 0
for w in f[::-1]:
res += p // w
p %= w
print(res)
提出情報
| 提出日時 | |
|---|---|
| 問題 | B - Factorial Yen Coin |
| ユーザ | cubesat |
| 言語 | Python (3.8.2) |
| 得点 | 200 |
| コード長 | 173 Byte |
| 結果 | AC |
| 実行時間 | 27 ms |
| メモリ | 9120 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 200 / 200 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | sample_00.txt, sample_01.txt, sample_02.txt |
| All | max_00.txt, min_00.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, sample_00.txt, sample_01.txt, sample_02.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| max_00.txt | AC | 18 ms | 9036 KiB |
| min_00.txt | AC | 27 ms | 8988 KiB |
| random_00.txt | AC | 25 ms | 9120 KiB |
| random_01.txt | AC | 19 ms | 8868 KiB |
| random_02.txt | AC | 18 ms | 8980 KiB |
| random_03.txt | AC | 18 ms | 8880 KiB |
| random_04.txt | AC | 19 ms | 9032 KiB |
| sample_00.txt | AC | 19 ms | 8984 KiB |
| sample_01.txt | AC | 23 ms | 8876 KiB |
| sample_02.txt | AC | 18 ms | 8872 KiB |