fork download
  1. #include <bits/stdc++.h>
  2. #include<cstring>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. // your code goes here
  8. string s;
  9. cin>>s;
  10. bool only_digits=true;
  11. for(int i=0;i<s.length();i++){
  12. if(!isdigit(s[i])){
  13. only_digits=false;
  14. break;
  15. }
  16. }
  17. if(only_digits)
  18. {
  19. cout<<"Yes"<<endl;
  20. }else{
  21. cout<<"No"<<endl;
  22. }
  23. return 0;
  24. }
Success #stdin #stdout 0.01s 5448KB
stdin
SmartInterviews1234
stdout
No