結果

問題 No.193 筒の数式
ユーザー yuppe19 😺yuppe19 😺
提出日時 2015-04-27 09:22:28
言語 Python2
(2.7.18)
結果
AC  
実行時間 13 ms / 1,000 ms
コード長 445 bytes
コンパイル時間 656 ms
コンパイル使用メモリ 6,524 KB
実行使用メモリ 6,320 KB
最終ジャッジ日時 2023-09-18 13:41:41
合計ジャッジ時間 1,138 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
6,276 KB
testcase_01 AC 12 ms
6,148 KB
testcase_02 AC 12 ms
6,104 KB
testcase_03 AC 13 ms
6,208 KB
testcase_04 AC 12 ms
6,080 KB
testcase_05 AC 11 ms
6,072 KB
testcase_06 AC 12 ms
6,092 KB
testcase_07 AC 12 ms
6,104 KB
testcase_08 AC 12 ms
6,076 KB
testcase_09 AC 12 ms
6,172 KB
testcase_10 AC 12 ms
6,148 KB
testcase_11 AC 12 ms
6,320 KB
testcase_12 AC 11 ms
6,100 KB
testcase_13 AC 12 ms
6,208 KB
testcase_14 AC 11 ms
6,080 KB
testcase_15 AC 11 ms
6,080 KB
testcase_16 AC 12 ms
6,092 KB
testcase_17 AC 12 ms
6,300 KB
testcase_18 AC 12 ms
6,236 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python
import re
from itertools import chain
flatten = lambda listOfLists: chain.from_iterable(listOfLists)
rotate = lambda arr, n: arr[n:] + arr[:n]

s = raw_input()
hamark = float('-inf')
for i in xrange(len(s)):
    x = rotate(s, i)
    y = re.split('\D', x)
    z = re.split('\d+', x)
    if len(z[0] + z[-1]):
        continue
    w = ''.join(map(str, flatten(zip(z, map(int, y)))))
    hamark = max(hamark, eval(w))
print hamark
0