>>19058126P10000 = 500 coins
Porygon cost 9999C
so it cost P10000 x 20 or 200000 to buy a Porygon
By beating the Elite Four you get P29799
and 29799 x 7 = 208593
So by beating the Elite Four 7 times you will have enough money to buy a Porygon (in Red/Yellow, Porygon is cheaper in Blue).