Class: Atcoder148A::Function
- Inherits:
-
Object
- Object
- Atcoder148A::Function
- Defined in:
- lib/atcoder_148_a.rb
Instance Attribute Summary collapse
-
#a ⇒ Object
readonly
Returns the value of attribute a.
-
#b ⇒ Object
readonly
Returns the value of attribute b.
Instance Method Summary collapse
-
#initialize(a, b) ⇒ Function
constructor
A new instance of Function.
- #solve ⇒ Object
Constructor Details
Instance Attribute Details
#a ⇒ Object (readonly)
Returns the value of attribute a.
11 12 13 |
# File 'lib/atcoder_148_a.rb', line 11 def a @a end |
#b ⇒ Object (readonly)
Returns the value of attribute b.
11 12 13 |
# File 'lib/atcoder_148_a.rb', line 11 def b @b end |
Instance Method Details
#solve ⇒ Object
20 21 22 |
# File 'lib/atcoder_148_a.rb', line 20 def solve ([1, 2, 3] - [@a, @b]).first end |