結果
| 問題 | No.3658 Darumaka Number 2 |
| コンテスト | |
| ユーザー |
回転
|
| 提出日時 | 2026-08-30 13:57:58 |
| 言語 | PyPy3 (7.3.23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 446 bytes |
| 記録 | |
| コンパイル時間 | 399 ms |
| コンパイル使用メモリ | 95,848 KB |
| 実行使用メモリ | 171,392 KB |
| 最終ジャッジ日時 | 2026-08-30 13:58:10 |
| 合計ジャッジ時間 | 6,978 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 39 WA * 6 |
ソースコード
import pypyjit
pypyjit.set_param("max_unroll_recursion=-1")
import sys
sys.setrecursionlimit(10**5+100)
S = input()
N = len(S)
ans = []
def f(n,giri):
if(n == N):
print("".join(ans))
exit()
if(not giri or int(S[n]) >= 5):
ans.append("5")
f(n+1,giri and S[n] == "5")
ans.pop()
if(not giri or int(S[n]) >= 4):
ans.append("4")
f(n+1,giri and S[n] == "4")
f(0,True)
f(1,False)
回転