結果

問題 No.342 一番ワロタww
ユーザー 小指が強い人小指が強い人
提出日時 2016-02-12 23:01:43
言語 Ruby
(3.2.2)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 1,175 bytes
コンパイル時間 74 ms
コンパイル使用メモリ 11,372 KB
実行使用メモリ 15,288 KB
最終ジャッジ日時 2023-08-05 16:05:19
合計ジャッジ時間 2,427 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
15,280 KB
testcase_01 WA -
testcase_02 AC 80 ms
15,212 KB
testcase_03 AC 81 ms
15,140 KB
testcase_04 AC 82 ms
15,056 KB
testcase_05 AC 80 ms
15,132 KB
testcase_06 AC 80 ms
15,136 KB
testcase_07 AC 81 ms
15,084 KB
testcase_08 AC 79 ms
15,288 KB
testcase_09 AC 80 ms
15,028 KB
testcase_10 AC 80 ms
15,020 KB
testcase_11 AC 79 ms
15,068 KB
testcase_12 AC 81 ms
15,260 KB
testcase_13 AC 80 ms
15,172 KB
testcase_14 AC 81 ms
15,144 KB
testcase_15 AC 80 ms
15,216 KB
testcase_16 AC 80 ms
15,180 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:63: warning: mismatched indentations at 'end' with 'if' at 47
Syntax OK

ソースコード

diff #

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
0