Position

Write a function @pos_a(s, k)@ that takes a string s and a non-negative
integer k and returns the position where the k-th letter a occurs within
s, or -1 if the string s contains fewer than k letters a.

Sample session

Problem information

Author: InfBesos

Generation: 2026-01-25T14:51:48.157Z

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