結果
| 問題 |
No.342 一番ワロタww
|
| コンテスト | |
| ユーザー |
tsuchinaga
|
| 提出日時 | 2019-03-19 09:25:56 |
| 言語 | Go (1.23.4) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 586 bytes |
| コンパイル時間 | 15,476 ms |
| コンパイル使用メモリ | 223,036 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-13 12:09:58 |
| 合計ジャッジ時間 | 15,739 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 WA * 3 |
ソースコード
package main
import "fmt"
func main() {
var s, t string
var w, max int
_, _ = fmt.Scan(&s)
ans := make([]string, 0)
for _, r := range []rune(s) {
if string(r) == "w" {
w++
} else {
if w != 0 {
if max < w && t != "" {
ans = []string{t}
max = w
} else if max == w && t != "" {
ans = append(ans, t)
}
t = ""
w = 0
}
t += string(r)
}
}
if max < w && t != "" {
ans = []string{t}
max = w
} else if max == w && t != "" {
ans = append(ans, t)
}
// fmt.Println(ans)
for _, str := range ans {
fmt.Println(str)
}
}
tsuchinaga