题意
给你 x 块钱,你花费多少会返回给你 x / 10 取整的前,问你最多能花费多少?
思路
数学题,按照题意所说模拟即可
code
#include<bits/stdc++.h>
#define endl '\n'
using namespace std;
typedef long long ll;
int n,t;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
cin>>t;
while(t--){
ll x;
cin>>x;
ll num=0,ans=0;
while(x>=10){
num=x/10;
x=x/10+x%10;
ans+=num*10;
}
cout<<ans+x<<endl;
}
return 0;
}
学如逆水行舟,不进则退