結果
問題 | No.24 数当てゲーム |
ユーザー |
|
提出日時 | 2016-01-03 22:35:29 |
言語 | Go (1.23.4) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 805 bytes |
コンパイル時間 | 11,536 ms |
コンパイル使用メモリ | 235,884 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-10 20:32:10 |
合計ジャッジ時間 | 12,287 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
package mainimport ("fmt")func main() {list := [10]bool{true, true, true, true, true, true, true, true, true, true}var n intfmt.Scan(&n)for i := 0; i < n; i++ {var a, b, c, d intvar r stringfmt.Scan(&a, &b, &c, &d, &r)if r == "YES" {for x := 0; x < 10; x++ {if list[x] == true && x != a && x != b && x != c && x != d {list[x] = false}}} else {for x := 0; x < 10; x++ {if list[x] == true && (x == a || x == b || x == c || x == d) {list[x] = false}}}}for x := 0; x < 10; x++ {if list[x] == true {fmt.Println(x)}}}