fork download
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. long long n;
  8.  
  9. cin>>n;
  10.  
  11. if(n>=-pow(2,15) && n<=pow(2,15)-1)
  12. cout<<"short";
  13. else if(n>=-pow(2,31) && n<=pow(2,31)-1)
  14. cout<<"int";
  15. else
  16. cout<<"long long";
  17.  
  18. return 0;
  19. }
Success #stdin #stdout 0.01s 5288KB
stdin
-10
stdout
short