DWITE '09 R1 #1 - iProfits

View as PDF

Submit solution

Points: 3
Time limit: 2.0s
Memory limit: 64M

Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig
DWITE Online Computer Programming Contest, October 2009, Problem 1

Having decided to capitalize on your awesome programming skills, you've set out to create and sell a mobile application at \$0.99 per copy. Since the application is hosted and distributed through a managed platform, the store gets to keep 30\% from each sale.

Given that you have an idea of how much profit you want to make off your hard work, at least how many 1\,000s of copies must be sold? (That is, the answer is rounded to the next 1\,000).

The input will contain 5 lines, integers 0 \leq N \leq 1\,000\,000 the minimum profit you want to keep.

The output will contain 5 lines, integer value of number of copies needed to be sold, rounded to the next 1000.

For example: if you want to make \$1\,000, then (1\,444 \text{ copies} \times $0.99) - 30\% = \$1\,000.692. (1\,443 copies will earn below \$1\,000). 1\,444 rounded to the next 1\,000 is 2\,000; thus the answer is 2\,000.

Sample Input


Sample Output


Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0) Problem Resource: DWITE


There are no comments at the moment.