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-05-21T12:05:48.716Z

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