結果

問題 No.193 筒の数式
ユーザー suppy193suppy193
提出日時 2015-06-18 13:51:59
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 219 bytes
コンパイル時間 229 ms
コンパイル使用メモリ 11,404 KB
実行使用メモリ 15,368 KB
最終ジャッジ日時 2023-09-21 09:26:02
合計ジャッジ時間 2,591 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
15,344 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 75 ms
15,308 KB
testcase_04 AC 76 ms
15,364 KB
testcase_05 AC 77 ms
15,160 KB
testcase_06 WA -
testcase_07 AC 77 ms
15,364 KB
testcase_08 AC 76 ms
15,244 KB
testcase_09 AC 76 ms
15,300 KB
testcase_10 WA -
testcase_11 AC 76 ms
15,344 KB
testcase_12 AC 76 ms
15,076 KB
testcase_13 AC 77 ms
15,032 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

s = gets.chomp
max = 0
(1...s.length).each do |i|
#	print s[0, i], " ", s[i..-1], "\n"
	s2 = s[i..-1] + s[0, i]
	next if s2[0] < '0' || s2[0] > '9' || s2[-1] < '0' || s2[-1] > '9'
	max = [eval(s2), max].max
end
puts max
0