結果

問題 No.193 筒の数式
ユーザー 👑 kmjpkmjp
提出日時 2015-04-27 00:21:38
言語 Python2
(2.7.18)
結果
AC  
実行時間 13 ms / 1,000 ms
コード長 292 bytes
コンパイル時間 652 ms
コンパイル使用メモリ 6,720 KB
実行使用メモリ 6,300 KB
最終ジャッジ日時 2023-09-18 12:25:01
合計ジャッジ時間 1,122 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
6,148 KB
testcase_01 AC 12 ms
6,296 KB
testcase_02 AC 13 ms
6,128 KB
testcase_03 AC 13 ms
6,128 KB
testcase_04 AC 12 ms
6,252 KB
testcase_05 AC 11 ms
6,136 KB
testcase_06 AC 12 ms
6,120 KB
testcase_07 AC 12 ms
6,072 KB
testcase_08 AC 12 ms
6,068 KB
testcase_09 AC 12 ms
6,068 KB
testcase_10 AC 12 ms
6,300 KB
testcase_11 AC 12 ms
6,184 KB
testcase_12 AC 12 ms
6,048 KB
testcase_13 AC 12 ms
6,184 KB
testcase_14 AC 12 ms
6,116 KB
testcase_15 AC 12 ms
6,116 KB
testcase_16 AC 12 ms
6,048 KB
testcase_17 AC 12 ms
6,068 KB
testcase_18 AC 12 ms
6,068 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import math
import re

mi=-1<<60
S=raw_input().strip()

for i in range(11):
	S=S[1:]+S[0]
	if S[0]=='+':
		continue
	if S[0]=='-':
		continue
	if S[-1]=='+':
		continue
	if S[-1]=='-':
		continue
	s = re.sub(r'(\d+)', lambda m:str(int(m.group())), S)
	mi=max(mi,eval(s))

print mi
0