結果

問題 No.2426 Select Plus or Minus
ユーザー noriocnorioc
提出日時 2023-08-18 22:49:12
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 276 bytes
コンパイル時間 361 ms
コンパイル使用メモリ 87,160 KB
実行使用メモリ 71,580 KB
最終ジャッジ日時 2023-08-18 22:49:21
合計ジャッジ時間 7,223 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
71,192 KB
testcase_01 AC 63 ms
71,148 KB
testcase_02 AC 83 ms
71,180 KB
testcase_03 AC 86 ms
71,380 KB
testcase_04 AC 62 ms
71,564 KB
testcase_05 AC 66 ms
71,324 KB
testcase_06 AC 80 ms
71,152 KB
testcase_07 AC 63 ms
71,112 KB
testcase_08 AC 63 ms
71,232 KB
testcase_09 AC 63 ms
71,328 KB
testcase_10 AC 86 ms
71,152 KB
testcase_11 AC 64 ms
71,140 KB
testcase_12 AC 84 ms
71,260 KB
testcase_13 AC 63 ms
71,068 KB
testcase_14 AC 79 ms
71,192 KB
testcase_15 AC 62 ms
71,364 KB
testcase_16 AC 63 ms
71,360 KB
testcase_17 AC 60 ms
71,216 KB
testcase_18 AC 70 ms
71,376 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 63 ms
71,064 KB
testcase_25 AC 63 ms
71,192 KB
testcase_26 AC 60 ms
71,228 KB
testcase_27 AC 60 ms
71,476 KB
testcase_28 AC 61 ms
71,192 KB
testcase_29 AC 63 ms
71,228 KB
testcase_30 AC 61 ms
71,064 KB
testcase_31 AC 61 ms
71,244 KB
testcase_32 AC 63 ms
71,292 KB
testcase_33 AC 61 ms
71,132 KB
testcase_34 AC 79 ms
71,060 KB
testcase_35 AC 61 ms
71,284 KB
testcase_36 AC 63 ms
71,276 KB
testcase_37 AC 66 ms
71,152 KB
testcase_38 AC 63 ms
71,232 KB
testcase_39 AC 64 ms
71,464 KB
testcase_40 AC 74 ms
71,396 KB
testcase_41 AC 61 ms
71,064 KB
testcase_42 AC 61 ms
71,328 KB
testcase_43 AC 62 ms
71,372 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

ans = []
x = N
m = 10 ** 18
while x != 1:
    if x % 2 == 0:
        ans.append('/')
        x //= 2
    elif x < 100:
        ans.append('+')
        x = 3 * x + 1
    else:
        ans.append('-')
        x = 3 * x - 1

print(len(ans))
print(''.join(ans))
0