No tags yet

No tag edit access

Time limit per test: 0.25 second(s)

Memory limit: 262144 kilobytes

Memory limit: 262144 kilobytes

input: standard

output: standard

output: standard

Andrew has just made a breakthrough in the world of number 17: he realized that it's rather easy to permute the digits in almost any given number to get a number divisible by 17. You are given a positive integer

sample input | sample output |

17 | 17 |

sample input | sample output |

2242223 | 2222342 |

sample input | sample output |

239 | -1 |

Codeforces (c) Copyright 2010-2020 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Aug/14/2020 12:20:21 (h1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|