7 kyu

Codewars Leaderboard Climber

418 of 1,228PG1

Description:

We all want to climb the leaderboard. Even given some of the massive scores on there, it's nice to know how close you are...

In this kata you will be given a username and their score, your score (not your real score) and you need to calculate how many kata you need to complete to beat their score, by 1 point exactly.

As this is the easy version (harder one to folow at some point in the future), let's assume only Beta kata and 8kyu kata are available. Worth 3 and 1 point respectively.

Return a string in this format: "To beat <user>'s score, I must complete <x> Beta kata and <y> 8kyu kata."

If the total number of kata you need to complete >1000, add "Dammit!" to the end of the string, like so: "To beat <user>'s score, I must complete <x> Beta kata and <y> 8kyu kata. Dammit!"

If your score is higher than the user's already, return "Winning!" and if they are equal, return "Only need one!"

Note: You are looking to complete as few kata as possible to get to your target.

Fundamentals
Strings
Mathematics

More By Author:

Check out these other kata created by PG1

Stats:

CreatedSep 9, 2016
PublishedSep 9, 2016
Warriors Trained2280
Total Skips81
Total Code Submissions4786
Total Times Completed1228
JavaScript Completions418
C# Completions125
Kotlin Completions194
Java Completions228
Ruby Completions48
Python Completions273
Total Stars30
% of votes with a positive feedback rating84% of 275
Total "Very Satisfied" Votes201
Total "Somewhat Satisfied" Votes60
Total "Not Satisfied" Votes14
Total Rank Assessments8
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • PG1 Avatar
  • Javatlacati Avatar
  • GiacomoSorbi Avatar
  • anter69 Avatar
  • AcesOfGlory Avatar
  • Chrono79 Avatar
  • user5036852 Avatar
  • hobovsky Avatar
  • Just4FunCoder Avatar
  • farhanaditya Avatar
  • saudiGuy Avatar
Ad