結果
| 問題 |
No.342 一番ワロタww
|
| コンテスト | |
| ユーザー |
小指が強い人
|
| 提出日時 | 2016-02-12 23:01:43 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 1,175 bytes |
| コンパイル時間 | 47 ms |
| コンパイル使用メモリ | 7,680 KB |
| 実行使用メモリ | 12,288 KB |
| 最終ジャッジ日時 | 2024-10-15 13:12:43 |
| 合計ジャッジ時間 | 2,352 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 WA * 1 |
コンパイルメッセージ
Main.rb:63: warning: mismatched indentations at 'end' with 'if' at 47 Syntax OK
ソースコード
s=gets
res=0
c=0
f=false
s.length.times do|i|
if s[i].ord==65367
next if !f
c +=1
else
f=true
res=c if c > res
c=0
end
end
f=false
res=c if c > res
c=0
s.length.times do|i|
if s[i].ord==65367
next if !f
c +=1
else
f=true
next if c==0
if res == c
j=1
next if i-j <= 0
while i-j>=0&&s[i-j].ord==65367
j+=1
end
next if i-j <= 0
while i-j>=0&&s[i-j].ord!=65367
j +=1
end
j-=1
while s[i-j].ord!=65367
print s[i-j]
j-=1
end
puts
end
c=0
end
end
exit
i=s.length
if res == c && c >1
j=1
exit if i-j <= 0
while i-j>=0&&s[i-j].ord==65367
j+=1
end
exit if i-j <= 0
while i-j>=0&&s[i-j].ord!=65367
j +=1
end
j-=1
while s[i-j].ord!=65367
print s[i-j]
j-=1
end
puts
end
小指が強い人