<PREV Problem:
NEXT>
Solved by 19 users: var, JohnJones_001, dan, Chmeli_BSU, Norbert, MaxBuzz, UdH-WiNGeR, Kuznetsov_S, defrager, WsemirZ, zloy_mipt, MasterYoda, DAV, akopich, RAVEman, fetetriste, vi002, Dest, s01A06.
UserDateAttemptTimeCMSC
vi00222 mar 2010Ruby100.19246 
zloy_mipt18 apr 2009Ruby100.18278 
var26 sep 2008Ruby100.19278 
var26 sep 2008Ruby300.19278 
Kuznetsov_S12 mar 2009Ruby710.04677 
MasterYoda31 jul 2009Java1100.21788 
akopich10 nov 2009Ruby703.02807 
Kuznetsov_S12 mar 2009Ruby600.15900 
MasterYoda31 jul 2009Java800.21902 
DAV21 aug 2009Java200.22913 
MaxBuzz16 feb 2009Java200.171131 
JohnJones_00130 sep 2008Java600.271157 
fetetriste23 feb 2010Java201.361210 
Languages
Java
8
Ruby
5
C++
4
Kylix
1
C
1
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 

Series

Time limit = 2.0 second(s)

Memory limit = 64 Mb

Output Teylor series of 1/P(x) for given polynom P(x). Degree of P(x) is less tnan 51.

Input Max degree M and polynop P(x). 0 ≤ M ≤ 50. Absolute values of nominators and denominators are less than 1001.

Output Rules: 1) x^1 should be writen as x, 2) -1 and 1 should not be written, output just sign 3) do not write + before the first element. 4) write space before x.

Input#1
5
1 + 10 x - 1/10 x^2

Output#1
1 - 10 x + 1001/10 x^2 - 1002 x^3 + 1003001/100 x^4 - 1004003/10 x^5

Input#2
4
2 + x^2

Output#2
1/2 - 1/4 x^2 + 1/8 x^4

Input#3
3
1 - x - 1/2 x^2 - 1/3 x^3

Output#3
1 + x + 3/2 x^2 + 7/3 x^3

Author:
Artem Voroztsov, individual MIPT contest, 21 sep., 2008
20 September 2008

<PREV | Problem set | Search related messages | NEXT>


© acm.mipt DevGroup
The page was generated in 190ms

SW soft NIX
ID = 52.3.228.47