結果

問題 No.193 筒の数式
ユーザー ciel
提出日時 2015-04-27 01:38:14
言語 Ruby
(3.4.1)
結果
AC  
実行時間 114 ms / 1,000 ms
コード長 106 bytes
コンパイル時間 69 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 12,288 KB
最終ジャッジ日時 2024-12-26 02:58:03
合計ジャッジ時間 3,077 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:2: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator
Syntax OK

ソースコード

diff #

r=eval s=gets
1.step(s.size){|i|s[i-1,2]=~/\d\d/&&r=[r,eval((s[i..-2]+s[0,i]).gsub /\d+/,&:to_i)].max}
p r
0