digits consists of digits. A pyramid is built from it: each new row is one digit shorter, and each of its digits is the last digit of the sum of two neighboring digits in the row before (that is, the sum modulo 10). Rows are built until a row has exactly two digits.
Return True if those two digits are equal, and False otherwise.digits="5146" → False
5146 → 650 (5+1, 1+4, 4+6=10 → 0) → 15. The digits 1 and 5 differ.
digits="282" → True
282 → 00 (2+8=10 → 0, 8+2=10 → 0). Both digits are zero.
digits contains only digitsdigits="5146"
False
Run checks the first 3 tests in your browser. Submit checks all 128 tests on the server, hidden ones included.