updated readme

This commit is contained in:
rshaghoulian
2017-04-30 18:30:26 -07:00
parent 9b6ef0f13b
commit 7145449310
57 changed files with 287 additions and 268 deletions
@@ -0,0 +1,21 @@
// Author: Rodney Shaghoulian
// Github: github.com/rshaghoulian
// HackerRank: hackerrank.com/rshaghoulian
import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
scan.close();
int people = 2;
int count = 2;
for (int i = 2; i <= n; i++) {
people = (people * 3) / 2;
count += people;
}
System.out.println(count);
}
}