結果

問題 No.2110 012 Matching
ユーザー urara
提出日時 2023-01-19 03:04:48
言語 Ruby
(3.4.1)
結果
WA  
実行時間 -
コード長 239 bytes
コンパイル時間 50 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 13,312 KB
最終ジャッジ日時 2024-06-12 02:46:08
合計ジャッジ時間 5,452 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other WA * 11
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

t = gets.to_i

results = []

t.times{
	a,b,c = gets.split.map &:to_i
	
	result = 0
	
	if c > a then
		result += (c - a) * 2
		c -= a
		result += c / 2
	else
		result += c * 2
	end
	
	result += b / 2 * 2
	
	results << result
}

puts results
0