結果
| 問題 |
No.203 ゴールデン・ウィーク(1)
|
| コンテスト | |
| ユーザー |
6soukiti29
|
| 提出日時 | 2019-07-20 15:27:11 |
| 言語 | Nim (2.2.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 326 bytes |
| コンパイル時間 | 2,846 ms |
| コンパイル使用メモリ | 66,176 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-02 05:53:35 |
| 合計ジャッジ時間 | 3,748 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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] /home/judge/data/code/Main.nim(1, 26) Warning: imported and not used: 'math' [UnusedImport]
ソースコード
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
6soukiti29