No tags yet

No tag edit access

Time limit per test: 1 second(s)

Memory limit: 262144 kilobytes

Memory limit: 262144 kilobytes

input: standard

output: standard

output: standard

It is not easy to prepare a problem for a programming contest. Petya and Vasya decided that problem "A+B" needs at least

Petya and Vasya are working by the same algorithm. Each time Petya (Vasya) finishes writing a solution, he checks on how many solutions have already been written up to the current time moment

Petya and Vasya realize that if they act on this algorithm, they will not necessarily write exactly

Considering that Petya and Vasya work non-stop, find, how many solutions they wrote in total and the moment when the latest solution was finished. The latest solution is one which was finished last.

sample input | sample output |

5 2 3 | 5 6 |

sample input | sample output |

5 2 4 | 6 8 |

sample input | sample output |

3 30 50 | 4 100 |

Codeforces (c) Copyright 2010-2019 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jun/25/2019 21:38:34 (f3).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|