結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー suppy193suppy193
提出日時 2017-02-08 10:13:38
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 118 bytes
コンパイル時間 394 ms
コンパイル使用メモリ 11,508 KB
実行使用メモリ 15,364 KB
最終ジャッジ日時 2023-08-26 17:22:43
合計ジャッジ時間 3,569 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
15,140 KB
testcase_01 AC 73 ms
15,220 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 72 ms
15,156 KB
testcase_06 WA -
testcase_07 AC 73 ms
15,044 KB
testcase_08 AC 72 ms
15,364 KB
testcase_09 AC 74 ms
15,252 KB
testcase_10 AC 73 ms
15,084 KB
testcase_11 AC 74 ms
15,136 KB
testcase_12 AC 72 ms
15,240 KB
testcase_13 AC 71 ms
15,324 KB
testcase_14 AC 70 ms
15,264 KB
testcase_15 AC 73 ms
15,308 KB
testcase_16 WA -
testcase_17 AC 77 ms
15,088 KB
testcase_18 AC 75 ms
15,212 KB
testcase_19 AC 72 ms
15,056 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n = gets.strip.to_i
a = gets.strip.split(' ').map(&:to_i)

x = 0
a.each do |ai|
	x |= ai
end
p 2**x.to_s(2).count('1')
0