BUSES

Xem PDF

Điểm: 350 Thời gian: 1.0s Bộ nhớ: 256M Input: bàn phím Output: màn hình

Programming competitions usually require infrastructure and organization on the part of those
responsible. A problem that frequently must be solved is regarding transportation. While participating
in a recent competition, Ricardinho watched the buses and micro-buses used in the transportation of
competitors, all lined up one behind the other as competitors disembarked. The vehicles were all from
the same company, although had different paintings. Ricardinho began to wonder how many ways
that line could be formed using buses and minibuse from that company.

Jach bus is 10 meters long, each minibus is 5 meters long. Given the total length of a line of buses
and minibuses, and the number of diferent colors each buse or minibus may be painted, Ricardinho
wants to know in how many ways such a line can be formed.

Input

  • The input contains a single line, containing three integers \(N, K\) and \(L\), representing respectively the
    total length, in meters, of the line Ricky is considering, \(K\) indicates the number of diferent colors for
    micro-buses, and \(L\) represents the number of different colors for buses. Note that, as integers \(N, K\)
    and \(L\) may be very large, the use of 64 bits integers is recormrnended.

Output

  • As the number of diferent ways of forming the line can be very large, Ricardinho is interested in the
    last 6 digits of that quantity. Thus, your program should produce a single line containing exactly 6
    digits, corresponding to the last digits of the solution.

Constants

  • \(5 \le N \le 10^{15}\) and \(N\) is multiple of 5
  • \(1 \le K \le 10^{15}\)
  • \(1 \le L \le 10^{15}\)

Example

Test 1

Input
25 5 5
Output
006000

Test 2

Input
5 1000 1000
Output
001000

Test 3

Input
20 17 31
Output
111359

Test 4

Input
15 9 2
Output
000765

Bình luận

Không có bình luận nào.