fork(3) download
  1. #include<iostream>
  2. #include<iomanip>
  3. #include<cstdlib>
  4. using namespace std;
  5.  
  6. int n;
  7.  
  8. int main()
  9. {
  10. cin>>n;
  11. if (n>1000)
  12. {
  13. cout<<fixed<<setprecision(0)<<n*1000<<"g"<<endl;
  14. cout<<n*0.001<<"t"<<endl;
  15. }
  16. else
  17. {
  18. cout<<n*1000<<"g"<<endl;
  19. cout<<n*0.001<<"t"<<endl;
  20. }
  21.  
  22. return 0;
  23. }
  24.  
Success #stdin #stdout 0s 4304KB
stdin
1
stdout
1000g
0.001t