結果
| 問題 |
No.2426 Select Plus or Minus
|
| コンテスト | |
| ユーザー |
H20
|
| 提出日時 | 2023-08-18 21:13:43 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 256 bytes |
| コンパイル時間 | 149 ms |
| コンパイル使用メモリ | 82,560 KB |
| 実行使用メモリ | 682,912 KB |
| 最終ジャッジ日時 | 2024-11-28 05:10:24 |
| 合計ジャッジ時間 | 57,220 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 MLE * 1 |
| other | AC * 11 WA * 1 TLE * 14 MLE * 15 |
ソースコード
N = int(input())
ANS = []
S = (20,10,5,14,7)
while N>1:
if N%2==0:
N=N//2
ANS.append('/')
elif not N in S:
N=N*3-1
ANS.append('-')
else:
N=N*3+1
ANS.append('+')
print(len(ANS))
print(''.join(ANS))
H20