結果
| 問題 | No.2426 Select Plus or Minus |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-08-18 23:52:20 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 491 bytes |
| 記録 | |
| コンパイル時間 | 56 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2026-10-01 09:35:10 |
| 合計ジャッジ時間 | 4,187 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 35 WA * 6 |
ソースコード
import sys
def main():
sys.setrecursionlimit(100000)
input = lambda: sys.stdin.readline()[:-1]
N = int(input())
ans = []
while N > 1:
if N % 2:
N = (N * 3) + 1
ans.append("+")
else:
N //= 2
ans.append("/")
print(len(ans))
print("".join(ans))
if not __debug__:
f = open(sys.argv[1], "r")
sys.stdin = f
try:
sys.set_int_max_str_digits(100000)
except AttributeError:
pass
main()