In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
In this article, the editor introduces "C++ case coding analysis" in detail, with detailed contents, clear steps and proper handling of details. I hope this "C++ case coding analysis" article can help you solve your doubts. Let's follow the editor's train of thought to slowly deepen, let's learn new knowledge.
Total time limit: 1000ms memory limit: 65536kB
Description
Farmer John made a lot of money last year! He wants to invest the money.
And curious about how much they can get.
The compound annual interest rate for known investments is R (an integer between 0 and 20).
John has money with a total value of M (an integer between 100 and 1000000).
He knows very well that he is going to invest in Y years (range from 0 to 400).
Please help him calculate how much money he will have in the end, and output the integer part of it.
The data ensures that the output is within the range of 32-bit signed integers.
Input
A line contains three integers R _ ~ Y, and two adjacent integers are separated by a single space.
Output
An integer, that is, how much money John finally has (the integer part).
Sample input
5 5000 4
Sample output
6077
Prompt
In the sample
After the first year: 1.05 * 5000 = 5250
After the second year: 1.05 * 5250 = 5512.5
After the third year: 1.05 * 5512.50 = 5788.125
After the fourth year: 1.05 * 5788.125 = 6077.53125
The integer portion of 6077.53125 is 6077.
Source
USACO 2004 November
, /
# include
Using namespace std
Int main ()
{
Int r,m,y
Cin > > r > > m > > y
Double x
Xampm
For (int iTunes 1)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.