mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
26 lines
400 B
C++
26 lines
400 B
C++
|
#include<iostream>
|
||
|
using namespace std;
|
||
|
int main()
|
||
|
{
|
||
|
int n;
|
||
|
cin>>n;
|
||
|
while(n--)
|
||
|
{
|
||
|
int x,t=0,a,b,c;
|
||
|
cin>>x;
|
||
|
a=x/2;
|
||
|
b=(x-a)*2/3;
|
||
|
c=x-a-b;
|
||
|
t+=a/10;
|
||
|
if(a%10)
|
||
|
t++;
|
||
|
t+=b/10;
|
||
|
if(b%10)
|
||
|
t++;
|
||
|
t+=c/10;
|
||
|
if(c%10)
|
||
|
t++;
|
||
|
cout<<t<<endl;
|
||
|
}
|
||
|
}
|