Beta

Return Even Whatever You've Been Given

221 of 308ilya_plotnikov

Description:

Given integer n return even numbers as they are, but subtract 1 from odd numbers.

Your solution should be 32 or less characters long.

Examples

Input = 3
Output = 2

Input = 16
Output = 16

Input = 45
Output = 44
Fundamentals
Algorithms

Similar Kata:

More By Author:

Check out these other kata created by ilya_plotnikov

Stats:

CreatedOct 15, 2020
PublishedOct 15, 2020
Warriors Trained490
Total Skips8
Total Code Submissions3663
Total Times Completed308
Python Completions221
JavaScript Completions103
Total Stars7
% of votes with a positive feedback rating80% of 220
Total "Very Satisfied" Votes163
Total "Somewhat Satisfied" Votes28
Total "Not Satisfied" Votes29
Total Rank Assessments183
Average Assessed Rank
7 kyu
Highest Assessed Rank
1 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • ilya_plotnikov Avatar
  • monadius Avatar
  • LarisaOvchinnikova Avatar
Ad