結果
問題 |
No.2426 Select Plus or Minus
|
ユーザー |
👑 |
提出日時 | 2023-08-17 20:39:33 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 290 bytes |
コンパイル時間 | 144 ms |
コンパイル使用メモリ | 82,000 KB |
実行使用メモリ | 53,976 KB |
最終ジャッジ日時 | 2024-11-27 05:41:46 |
合計ジャッジ時間 | 4,409 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 WA * 11 |
ソースコード
N=int(input()) sosa="" for i in range(10000): if N%2 == 0: N/=2 sosa=sosa+"/" else: if i%2 == 0: N=N*3+1 sosa=sosa+"+" else: N=N*3-1 sosa=sosa+"-" if N==1: break print(len(sosa)) print(sosa)