fork download
  1. #include <bits/stdc++.h>
  2. #define ll long long
  3. using namespace std;
  4. ll n;
  5. int main()
  6. {
  7. cin>>n;
  8. while(n--)
  9. {
  10. ll t,d=0;
  11. cin>>t;
  12. if(t>=100) d+=t/100,t%=100;
  13. if(t>=20) d+=t/20,t%=20;
  14. if(t>=10) d+=t/10,t%=10;
  15. if(t>=5) d+=t/5,t%=5;
  16. if(t>=1) d+=t;
  17. cout<<d<<"\n";
  18. }
  19. }
Success #stdin #stdout 0.08s 52520KB
stdin
Standard input is empty
stdout
Standard output is empty