Created
October 30, 2012 08:14
-
-
Save ymkawb/3978918 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static String func(int n){ | |
int k = n /2 + 10; | |
int f = 1 - ( n % 2); | |
int s = n %2; | |
int result = (k * f) / 10 + (k * s) % 10; | |
return String.valueOf(result); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment