結果

問題 No.2426 Select Plus or Minus
ユーザー hato336
提出日時 2023-08-18 21:07:53
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 392 bytes
コンパイル時間 225 ms
コンパイル使用メモリ 82,084 KB
実行使用メモリ 86,332 KB
最終ジャッジ日時 2024-11-28 04:52:24
合計ジャッジ時間 9,012 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 35 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
#n = int(input())
#
#alist = []
#s = input()
n = int(input())
m = n
check = []
ans = 0
while m != 1:
    ans += 1
    if m % 2 == 0:
        m //= 2
        check.append('/')
    else:
        m = 3 * m + 1
        check.append('+')
print(ans)
print(''.join(check))
0