結果
問題 |
No.2426 Select Plus or Minus
|
ユーザー |
![]() |
提出日時 | 2023-08-18 21:35:03 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 396 bytes |
コンパイル時間 | 218 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,136 KB |
最終ジャッジ日時 | 2024-11-28 06:01:00 |
合計ジャッジ時間 | 8,163 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | AC * 8 WA * 33 |
ソースコード
import sys input = lambda :sys.stdin.readline()[:-1] def main(): N = int(input()) i = 0 ans = [] while i <= 10000 and N < 10 ** 18 and N != 1: if N % 2== 0: N //= 2 ans.append("/") else: N = 3 * N - 1 ans.append("-") i += 1 print(i) print(*ans, sep="") if __name__ == '__main__': main()