#include <iostream>
using namespace std;
int main() {
// 宣告變數
int balance = 100;
int r = 10;
int goal = 200;
int n = 0;
while (balance < goal) {
balance *= (1 + r / 100.0);
n++;
}
cout << "Holding years = " << n << endl;
cout << "Balance = " << balance << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CgkvLyDlrqPlkYrorormlbgKICAgIGludCBiYWxhbmNlID0gMTAwOwogICAgaW50IHIgPSAxMDsKICAgIGludCBnb2FsID0gMjAwOwogICAgCiAgICBpbnQgbiA9IDA7CiAgICB3aGlsZSAoYmFsYW5jZSA8IGdvYWwpIHsKICAgICAgICBiYWxhbmNlICo9ICgxICsgciAvIDEwMC4wKTsKICAgICAgICBuKys7CiAgICB9CiAgICAKICAgIGNvdXQgPDwgIkhvbGRpbmcgeWVhcnMgPSAiIDw8IG4gPDwgZW5kbDsKICAgIGNvdXQgPDwgIkJhbGFuY2UgPSAiIDw8IGJhbGFuY2UgPDwgZW5kbDsKICAgIAoJcmV0dXJuIDA7Cn0=