Light Mode
Dark Mode
Inconsistent test data

The mission is: https://py.checkio.org/en/mission/r-mahjong-iii-count-shanten-2/

Some tests pass the argument of the function as a list: "input": [['p4', 'p5', 'p6', 'm1', 'm1', 'm1', 's2', 's3', 's4', 's9', 'we', 'we', 'dw', 'dw']]

While others pass it as multiple individual strings: "input": ['s4', 's2', 's1', 's2', 's3', 's4', 's1', 's3', 's1', 's4', 's1', 's2', 's1', 's3']

I made my function return None in the second case, since it was supposed to receive one list with 14 elements, and not 14 separate strings. However, the error message wasn’t very helpful, as my None was displayed as 0 in the output:

Extra/7

assert riichimahjongshanten('s4', 's2', 's4', 's5', 's5', 's2', 's4', 's6', 's2', 's3', 's3', 's3', 's6', 's6') == 0

Your result: 0

Created: Nov. 4, 2025, 2:50 a.m.
Updated: Nov. 4, 2025, 2:52 a.m.
0
23
User avatar
littleplatypus