#include<iostream> using namespace std; int main() { int t; scanf("%d",&t); while(t --) { long long n; scanf("%lld",&n); printf("%lld ",n / 100); n %= 100; printf("%lld ",n / 50); n %= 50; printf("%lld ",n / 20); n %= 20; printf("%lld ",n / 10); n %= 10; printf("%lld ",n / 5); n %= 5; printf("%lld",n); printf("\n"); } return 0; } |
Double click to view unformatted code.