fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int N;
  7. cin>>N;
  8. if(N<=10){
  9. cout<<N*6;
  10. }
  11. else if(11<=N && N<=20){
  12. cout<<(10*6)+(N-10)*2;
  13. }
  14. else if(21<=N && N<=39){
  15. cout<<(10*6)+(10*2)+(N-20)*1;
  16. }
  17. else if(N>=40){
  18. cout<<"100";
  19. }
  20.  
  21. return 0;
  22. }
Success #stdin #stdout 0s 5320KB
stdin
4234890234
stdout
100