結果

問題 No.193 筒の数式
ユーザー ciel
提出日時 2015-04-27 01:32:48
言語 Ruby
(3.4.1)
結果
AC  
実行時間 102 ms / 1,000 ms
コード長 108 bytes
コンパイル時間 143 ms
コンパイル使用メモリ 7,296 KB
実行使用メモリ 12,160 KB
最終ジャッジ日時 2024-12-26 14:57:56
合計ジャッジ時間 2,732 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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 /0+(\d+)/,'\1')].max}
p r
0