104A - Blackjack

104A - Blackjack

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4. int n;
  5. cin>>n;
  6. int d=n-10;
  7. if(d==10 ) cout<<15;
  8. else if(d==0) cout<<0;
  9. else if(d>11 or n<=10) cout<<0;
  10. else if(d<=11)cout<<4;
  11. }

Comments

Popular posts from this blog

Codeforce Problem 1703A. YES or YES?

Aptitude test assistant programmer 2018

1041A. Heist solution