結果
| 問題 |
No.203 ゴールデン・ウィーク(1)
|
| コンテスト | |
| ユーザー |
toshiro_yanagi
|
| 提出日時 | 2022-07-01 07:08:33 |
| 言語 | Go (1.23.4) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 347 bytes |
| コンパイル時間 | 11,696 ms |
| コンパイル使用メモリ | 231,888 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-25 08:42:20 |
| 合計ジャッジ時間 | 12,852 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 29 |
ソースコード
package main
import "fmt"
func main() {
var input string
fmt.Scan(&input)
s := input
fmt.Scan(&input)
s += input
ans := 0
cnt := 0
for _, c := range s {
switch c {
case 'o':
cnt++
case 'x':
cnt = 0
}
ans = max(ans, cnt)
}
fmt.Println(ans)
}
func max(a, b int) (res int) {
res = a
if b > a {
res = b
}
return
}
toshiro_yanagi