結果
問題 |
No.91 赤、緑、青の石
|
ユーザー |
|
提出日時 | 2016-03-23 14:13:40 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 186 bytes |
コンパイル時間 | 147 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-10-01 21:25:18 |
合計ジャッジ時間 | 4,038 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 21 WA * 7 |
コンパイルメッセージ
Main.rb:8: warning: `-' after local variable or literal is interpreted as binary operator Main.rb:8: warning: even though it seems like unary operator Main.rb:8: warning: possibly useless use of - in void context Syntax OK
ソースコード
r,a,b = gets.split().map(&:to_i).sort a -= r b -=r if a*3 <= b r += a b -+ a*3 r += b/5 else s = (b-a)/2 r += s a -= s b -= s*3 a -= 1 if (a+b)%8 == 4 r += (a+b)/4 end puts r