8 kyu

Get Nth Even Number

10,741 of 37,678kodejuice

Description:

Return the Nth Even Number

Example(Input --> Output)

1 --> 0 (the first even number is 0)
3 --> 4 (the 3rd even number is 4 (0, 2, 4))
100 --> 198
1298734 --> 2597466

The input will not be 0.

Mathematics
Puzzles
Algorithms

Stats:

CreatedJun 4, 2017
PublishedJun 5, 2017
Warriors Trained48331
Total Skips642
Total Code Submissions67876
Total Times Completed37678
JavaScript Completions10741
Crystal Completions70
Python Completions10040
Ruby Completions850
Java Completions4193
C Completions1413
BF Completions224
C# Completions1952
Rust Completions748
NASM Completions64
C++ Completions5276
TypeScript Completions441
CoffeeScript Completions54
Elixir Completions127
Julia Completions69
Dart Completions526
PHP Completions763
Reason Completions27
Haskell Completions269
Racket Completions49
R Completions164
Factor Completions28
PureScript Completions34
Go Completions960
Clojure Completions166
Forth Completions75
Elm Completions75
Swift Completions796
COBOL Completions25
OCaml Completions53
Lua Completions96
Scala Completions58
SQL Completions814
D Completions24
Total Stars297
% of votes with a positive feedback rating88% of 3952
Total "Very Satisfied" Votes3168
Total "Somewhat Satisfied" Votes623
Total "Not Satisfied" Votes161
Total Rank Assessments111
Average Assessed Rank
7 kyu
Highest Assessed Rank
4 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • kodejuice Avatar
  • GiacomoSorbi Avatar
  • natan Avatar
  • Jotha Avatar
  • xenoexplorator Avatar
  • imjasonmiller Avatar
  • kazk Avatar
  • Firefly2002 Avatar
  • wneumann Avatar
  • Voile Avatar
  • k.steflovic Avatar
  • mitron6 Avatar
  • Souzooka Avatar
  • dhodson Avatar
  • monadius Avatar
  • hobovsky Avatar
  • olegproger Avatar
  • user8436785 Avatar
  • ejini战神 Avatar
  • akar-0 Avatar
  • Glinator Avatar
  • LearningFTW Avatar
  • 4500zenja1 Avatar
  • fcr-- Avatar
  • KayleighWasTaken Avatar
Ad