結果
| 問題 |
No.2426 Select Plus or Minus
|
| コンテスト | |
| ユーザー |
taro2023
|
| 提出日時 | 2023-08-18 22:15:50 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 406 bytes |
| コンパイル時間 | 180 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 11,136 KB |
| 最終ジャッジ日時 | 2024-11-28 07:48:49 |
| 合計ジャッジ時間 | 8,696 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 RE * 1 |
| other | WA * 9 RE * 32 |
ソースコード
a=int(input())
def c(b,result=None):
if result is None:
result=[]
if b==1:
return result
else:
if b%2==0:
b=b/2
result.append("/")
else:
if b!=a:
b=3*b-1
result.append("-")
else:
b=3*b+1
result.append("+")
return c(b,result)
d=c(a)
print(*d)
taro2023