Saleh127

Light oj(LO) 1163

Jan 18th, 2021
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define test int t; cin>>t; for(int cs=1;cs<=t;cs++)
  5. int main()
  6. {
  7. ios_base::sync_with_stdio(0);
  8. cin.tie(0);
  9. cout.tie(0);
  10.  
  11. test
  12. {
  13.  
  14. ll x,a;
  15.  
  16. cin>>x;
  17. cout<<"Case "<<cs<<": ";
  18.  
  19. a=x+(x/9);
  20.  
  21. if(x%9==0)
  22. {
  23. cout<<a-1<<" "<<a<<endl;
  24. }
  25. else cout<<a<<endl;
  26. }
  27.  
  28.  
  29. return 0;
  30. }
  31.  
Advertisement
Add Comment
Please, Sign In to add comment