Skip to content

Instantly share code, notes, and snippets.

@stphung
Created April 16, 2011 18:06
Show Gist options
  • Select an option

  • Save stphung/923356 to your computer and use it in GitHub Desktop.

Select an option

Save stphung/923356 to your computer and use it in GitHub Desktop.
TopCoder SRM 503 Division 2 - 250 point problem
public class ToastXRaspberry {
public int apply(int upper_limit, int layer_count) {
if (layer_count % upper_limit != 0) {
return layer_count / upper_limit + 1;
} else {
return layer_count / upper_limit;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment