Position of Difference

Design a function @pos_dif(r, s)@ that, given two strings rr and ss, returns the first position at which rr and ss are different. If rr and ss are equal, the function must return 1-1.

Sample session

Problem information

Author: InfBesos

Generation: 2026-01-25T14:54:23.006Z

© Jutge.org, 2006–2026.
https://jutge.org