题目
https://codeforces.com/problemset/problem/1296/B
买10送1
比如你有141元
先买140,送14
剩14+1=15
于是等价于15能买多少,形成递归
#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
ll t;
cin >> t;
while (t--) {
ll m;
cin >> m;
ll plus = 0;
ll temp = m;
while (temp/10) {
plus += temp / 10;
ll l = temp/10;
temp = temp % 10 + l;
}
cout << m + plus << endl;
}
}