class neighborSum
=begin
:type grid: Integer[][]
=end
def initialize(grid)
end
=begin
:type value: Integer
:rtype: Integer
=end
def adjacent_sum(value)
end
=begin
:type value: Integer
:rtype: Integer
=end
def diagonal_sum(value)
end
end
# Your neighborSum object will be instantiated and called as such:
# obj = neighborSum.new(grid)
# param_1 = obj.adjacent_sum(value)
# param_2 = obj.diagonal_sum(value)
···
大家自己领会,我笑了