結果
| 問題 |
No.2268 NGワード回避
|
| コンテスト | |
| ユーザー |
tomerun
|
| 提出日時 | 2023-04-14 21:28:11 |
| 言語 | Crystal (1.14.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 2,000 ms |
| コード長 | 192 bytes |
| コンパイル時間 | 11,857 ms |
| コンパイル使用メモリ | 295,408 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-10 12:11:56 |
| 合計ジャッジ時間 | 13,857 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 52 |
ソースコード
n = read_line.to_i
s = Array.new(n) { read_line }
rnd = Random.new
while true
t = Array.new(n) { rnd.next_bool ? 'a' : 'b' }.join
if s.all? { |ng| ng != t }
puts t
break
end
end
tomerun