結果

問題 No.193 筒の数式
ユーザー Konton7Konton7
提出日時 2019-05-10 00:40:09
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 419 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 10,980 KB
実行使用メモリ 7,992 KB
最終ジャッジ日時 2023-09-14 17:48:42
合計ジャッジ時間 1,416 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,944 KB
testcase_01 WA -
testcase_02 AC 17 ms
7,820 KB
testcase_03 AC 17 ms
7,952 KB
testcase_04 RE -
testcase_05 AC 16 ms
7,864 KB
testcase_06 AC 16 ms
7,740 KB
testcase_07 AC 16 ms
7,828 KB
testcase_08 AC 16 ms
7,924 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 AC 16 ms
7,896 KB
testcase_13 AC 17 ms
7,968 KB
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
権限があれば一括ダウンロードができます

ソースコード

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