Skip to content

Instantly share code, notes, and snippets.

@ymkawb
Created October 30, 2012 08:14
Show Gist options
  • Save ymkawb/3978918 to your computer and use it in GitHub Desktop.
Save ymkawb/3978918 to your computer and use it in GitHub Desktop.
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