Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
you keep incrementing the
str
pointer. When youreturn
it, it is pointing to the nul-terminator, so it's effectively an empty string. Also, you overflow thechar
datatype by adding13
to the last ASCII letters (e.g.'z' + 13
)712,577,413,488,402,631,964,821,329 is bigger that the space for read using %ld Long int -> 2,147,483,647 https://en.wikipedia.org/wiki/C_data_types
you need work with parts of numbers using a string for keep the total
This comment is hidden because it contains spoiler information about the solution
It's written in the description :
This comment is hidden because it contains spoiler information about the solution
Read this. Check how you calculate
r
, isn
an int?And how is your solution being wrong an issue?