Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static void solve() throws IOException {
- long n = (long)nextInt();
- long a = nextInt();
- long b = nextInt();
- if(a * b - 6*n < 0) {
- for(; 6*n > a * b;) {
- a++;
- b++;
- }
- if (a*(b-1)>6*n) b-=1;
- if ((a-1)*b>6*n) a-=1;
- }
- writer.println(a*b);
- writer.println(a + " " + b);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement