結果

問題 No.193 筒の数式
ユーザー Konton7
提出日時 2019-05-10 00:40:09
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 419 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-07-02 00:53:50
合計ジャッジ時間 1,400 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 RE * 1
other AC * 7 WA * 1 RE * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

s = input()

eval_list = []

for i in range(len(s)):
	s = s[-1] + s[:-1]
	
	if s[0] not in ["+","-"] and s[-1] not in ["+","-"]:
		num_list = [str(int(v)) for v in s.split("+")]
		ope_list = []
		for j in range(len(s)):
			if s[j] in ["+","-"]:
				ope_list.append(s[j])

		s = ""
		for j in range(len(ope_list)):
			s += (num_list[j]+ope_list[j])
		s += num_list[-1]

		eval_list.append(eval(s))

print(max(eval_list))
0