Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define all(v) v.begin(),v.end()
- #define rall(v) v.rbegin(),v.rend()
- #define ll long long
- #define ull unsigned long long
- #define MOD 1000000007
- #define PI 3.14159265
- #define ceil(a, b) ((a / b) + (a % b ? 1 : 0))
- #define nl '\n'
- void Start_Crushing(){
- ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
- #ifndef ONLINE_JUDGE
- freopen("input.txt","r",stdin); freopen("output.txt","w",stdout);
- freopen("error.txt", "w", stderr);
- #endif
- }
- void printing(int n){
- if(n <= 0) return;
- printing(n / 10);
- cout << n % 10 << ' ';
- }
- void solve(){
- int n; cin >> n;
- if(n == 0){
- cout << 0;
- return;
- }
- printing(n);
- }
- int main(){
- Start_Crushing();
- int t = 1;
- /*is Single Test case?*/ cin >> t;
- while (t--) {
- solve();
- cout << "\n";
- }
- cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement