結果
問題 |
No.2778 Is there Same letter?
|
ユーザー |
|
提出日時 | 2024-06-09 20:49:15 |
言語 | Go (1.23.4) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 461 bytes |
コンパイル時間 | 10,727 ms |
コンパイル使用メモリ | 222,928 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-30 22:55:35 |
合計ジャッジ時間 | 11,716 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 |
ソースコード
// You can edit this code! // Click here and start typing. package main import "fmt" import "slices" import "strconv" func main() { var Nstr string fmt.Scan(&Nstr) N, _ := strconv.Atoi(Nstr) var S string fmt.Scan(&S) chars := []rune(S) foundChars := make([]rune, 0, N) for _, char := range chars { if slices.Contains(foundChars, char) { fmt.Println("Yes") return; } foundChars = append(foundChars, char) } fmt.Println("No") }