Problem H
BusesFile: buses.[c|cpp|java]Programming competitions usually require infrastructure and organization on the part of thoseresponsible. A problem that frequently must be solved is regarding transportation. While participatingin a recent competition, Ricardinho watched the buses and micro-buses used in the transportation ofcompetitors, all lined up one behind the other as competitors disembarked. The vehicles were all fromthe same company, although had different paintings. Ricardinho began to wonder how many waysthat line could be formed using buses and minibuse from that company.Each bus is 10 meters long, each minibus is 5 meters long. Given the total length of a line of busesand minibuses, and the number of different colors each buse or minibus may be painted, Ricardinhowants to know in how many ways such a line can be formed.InputThe input contains several test cases. Each test case is composed of a single line, containing threeintegers N, K and L, representing respectively the total length, in meters, of the line Ricky is con-sidering, K indicates the number of different colors for micro-buses, and L represents the number ofdifferent colors for buses. Note that, as integers N , K and L may be very large, the use of 64 bitsintegers is recommended.OutputAs the number of different ways of forming the line can be very large, Ricardinho is interested in thelast 6 digits of that quantity. Thus, your for each test case your program must produce a single linecontaining exactly 6 digits, corresponding to the last digits of the solution.Restrictions• 5 ≤ N ≤ 1015and N is multiple of 5• 1 ≤ K ≤ 1015• 1 ≤ L ≤ 1015ExamplesInput25 5 55 1000 100020 17 3115 9 2Output006000001000111359000765
#include#include #include #include #include #include #include #include #include #include