結果

問題 No.203 ゴールデン・ウィーク(1)
コンテスト
ユーザー 6soukiti29
提出日時 2019-07-20 15:27:11
言語 Nim
(2.2.6)
コンパイル:
nim --nimcache=~ --hints:off -o:a.out -d:release cpp _filename_
実行:
./a.out
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 326 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,086 ms
コンパイル使用メモリ 67,756 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2026-03-23 10:08:34
合計ジャッジ時間 2,927 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'sequtils' [UnusedImport]
/home/judge/data/code/Main.nim(1, 17) Warning: imported and not used: 'strutils' [UnusedImport]

ソースコード

diff #
raw source code

import sequtils,strutils,math
var
    a1 = stdin.readline
    a2 = stdin.readline
    ans = 0
a1 &= a2

for i in 0..a1.high:
    if a1[i] == 'x':
        continue
    for j in 0..a1.high:
        if i + j > a1.high:
            break
        if a1[i + j] != a1[i]:
            break
        ans = max(j + 1, ans)
echo ans
    
0