Online MIPT programming contest | РУССКИЙ |
<PREV Problem: | NEXT> |
< |
---|
Time limit = 7 second(s)
Your have access to big box of resisters with R = 1.You program should calculate PS-scheme with resistance R = M / N (see 094).
Input. One line with integers M and N. 1 ≤ M < 2000000, 0 < N < 2000000.
Output. PS-scheme descritpion. Use the minimal number of resisters.
Input#13 4 |
Output#1[1 (1 1 1)] |
Input#215 2 |
Output#2(1 1 1 1 1 1 1 [1 1]) |
Input#31 3 |
Output#3[1 1 1] |
Input#46 5 |
Output#4[(1 1) (1 1 1)] |
Input#515 7 |
Output#5(1 [(1 1) (1 1 [(1 1) 1])]) |
Author:
Artem Voroztsov
10 May 2006
© acm.mipt DevGroup The page was generated in 220ms |