6. [9] Petya had several hundred-ruble bills, and no other money. Petya started buying books (each book costs an integer number of rubles) and receiving change in small denominations (1-ruble coins). When buying an expensive book (not cheaper than 100 rubles), Petya paid only with hundred-ruble bills (the minimum necessary number of them), and when buying a cheap book (cheaper than 100 rubles), he paid with small denominations if he had enough, and if not, with a hundred-ruble bill. By the time the hundred-ruble bills ran out, Petya had spent exactly half of his money on books. Could Petya have spent at least 5000 rubles on books?

(Tatyana Kazitsyna)
Solution 1. Let's see how much small change Petya could have received.

Consider the very last cheap purchase that increased the amount of small change. Let the cost of this purchase be $x$, then before this, there was no more than $x-1$ rubles of small change, and thus, after this, it would become no more than $x-1+100-x=99$ rubles. Since expensive purchases do not reduce the amount of small change, all previous purchases together with the considered one gave a total of no more than 99 rubles of small change. Therefore, all cheap purchases together brought no more than 99 rubles.

Let there be $n$ purchases more expensive than 100 rubles. Each of them adds no more than 99 rubles of small change. If there were no other purchases at all, then the amount spent on expensive purchases would be no less than $2n$ hundreds, and the change would be no more than $99n$ - less than half of what was spent. Therefore, there are other purchases. But then Petya had no less than $2n+1$ hundred-ruble bills, and the small change at the end became no more than $99n+99$. Thus, $(2n+1)50 \leq 99n+99$, from which $n \leq 49$. Therefore, the small change will not exceed $99 \cdot 49 + 99 < 5000$ rubles. This means that less than 5000 rubles were spent.

Solution 2. Suppose some item was bought for $x$ rubles of small change. This small change appeared as change from previous purchases. Increase the cost of these purchases by the corresponding amounts, totaling $x$ rubles, and cancel the current purchase. Similarly, get rid of all purchases made with small change. On each step, the amount of small change decreases, so no new purchases with small change will appear.

There is a purchase costing no more than 50 rubles (small), otherwise less than half of all the money would remain. There is only one small purchase, as a second small purchase would have been made with the change from the first, and there are no more purchases with small change now.

The difference between the change for the small purchase and its price is no more than $99-1=98$ rubles. For each other purchase, this difference is negative and even (since the sum of the price and the change is a multiple of 100, i.e., even). Therefore, this difference is no less than -98 and no more than -2. Thus, there are no more than $98:2=49$ other purchases, and for each of them, no more than two hundred-ruble bills were given (otherwise, the specified difference would be no more than $99-201<-98$). Therefore, the total number of hundred-ruble bills was no more than $1+2 \cdot 49=99$, and half of this sum is no more than $9900:2=4950<5000$.