結果
問題 |
No.1458 Segment Function
|
ユーザー |
![]() |
提出日時 | 2021-03-31 21:36:43 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 262 bytes |
コンパイル時間 | 388 ms |
コンパイル使用メモリ | 82,276 KB |
実行使用メモリ | 68,792 KB |
最終ジャッジ日時 | 2024-12-15 16:03:32 |
合計ジャッジ時間 | 2,818 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 WA * 1 RE * 24 |
ソースコード
a = [6, 2, 5, 5, 4, 5, 6, 4, 7, 6] p, n = map(int, input().split()) if n == 0: print(p) exit(0) if p < 0: n -= 1 p = -p + 1 for i in range(min(n, 10000)): res = 0 for c in str(p): res += a[ord(c) - ord('0')] p = res print(res)