#include <stdio.h>
#include <stdlib.h>
int main()
{
int c,n,x,y,z;
scanf("%d",&c);
while(c--){
scanf("%d",&n);
int ans=0;
x=n/2;
y=(n-x)*2/3;
z=n-x-y;
if(x%10==0)ans+=x/10;
else ans+=x/10+1;
if(y%10==0)ans+=y/10;
else ans+=y/10+1;
if(z%10==0)ans+=z/10;
else ans+=z/10+1;
printf("%d\n",ans);
}
return 0;
}
水题