結果

問題 No.977 アリス仕掛けの摩天楼
ユーザー TomoProgTomoProg
提出日時 2020-02-11 21:15:33
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 244 bytes
コンパイル時間 65 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 29,308 KB
最終ジャッジ日時 2024-04-08 15:48:27
合計ジャッジ時間 5,108 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
16,256 KB
testcase_01 AC 87 ms
16,256 KB
testcase_02 AC 87 ms
16,256 KB
testcase_03 AC 85 ms
16,256 KB
testcase_04 AC 85 ms
16,256 KB
testcase_05 AC 89 ms
16,256 KB
testcase_06 AC 85 ms
16,256 KB
testcase_07 AC 89 ms
16,256 KB
testcase_08 AC 86 ms
16,256 KB
testcase_09 AC 86 ms
16,256 KB
testcase_10 WA -
testcase_11 AC 87 ms
16,256 KB
testcase_12 AC 86 ms
16,256 KB
testcase_13 WA -
testcase_14 AC 109 ms
17,536 KB
testcase_15 AC 112 ms
17,536 KB
testcase_16 WA -
testcase_17 AC 109 ms
17,572 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 207 ms
23,352 KB
testcase_21 AC 288 ms
27,900 KB
testcase_22 AC 358 ms
29,308 KB
testcase_23 AC 356 ms
29,180 KB
testcase_24 AC 341 ms
29,048 KB
testcase_25 AC 346 ms
29,180 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

island_num = gets.to_i
bridge_num = island_num - 1
connection = Hash.new(0)
bridge_num.times do
  islands = gets.split
  connection[islands[0]] += 1
  connection[islands[1]] += 1
end

puts(connection.keys.length == island_num ? "Bob" : "Alice")
0