**题意:**你有n元,每花满10元,可以获得1元,问你最后最多能花多少钱。
**思路:**按照题意模拟一遍就行。
code:
#include<bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
int t;
cin >> t;
while (t--) {
long long n;
cin >> n;
long long ans = 0;
while (n >= 10) {
long long cnt = n / 10;
ans = ans + cnt * 10 ;
n = n - cnt * 10+cnt;
}
ans += n;
cout << ans << endl;
}
return 0;
}