結果
| 問題 |
No.1458 Segment Function
|
| コンテスト | |
| ユーザー |
nok0
|
| 提出日時 | 2021-03-31 21:42:28 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 456 bytes |
| コンパイル時間 | 354 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 11,904 KB |
| 最終ジャッジ日時 | 2024-12-15 16:38:32 |
| 合計ジャッジ時間 | 2,221 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 7 WA * 1 RE * 24 |
ソースコード
p, n = map(int, input().split())
def f(x):
if x == 0:
return 6
if x == 1:
return 2
if x == 2:
return 5
if x == 3:
return 6
if x == 7:
return 4
if x == 8:
return 7
if x == 9:
return 6
return x
for i in range(min(10000, n)):
newp = 0
if p < 0:
newp += 1
p *= -1
s = str(p)
for c in s:
newp += f(int(c))
p = newp
print(p)
nok0