Language: C++








 


Beta 




 
 paiza.IO 


 ??°????????????  


?????§


???????????????


 ??\??¬???   






 
???????????¢?????? 

?????°?????? 

???  





 

























































 





C++   Split Button!   

   

 
 Main.cpp   ???  

 
+ 


 
 

 Success 



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47







        cent++;
    }
    
    while (pay >= 100){
        pay -= 100;
        cent++;
    }
    
    while (pay >= 50){
        pay -= 50;
        cent++;
    }
    
    while (pay >= 10){
        pay -= 10;
        cent++;
    }
    
    while (pay >= 5){
        pay -= 5;
        cent++;
    }
    
    while (pay >= 1){











 


??± ?????? (Ctrl-Enter)    Split Button!   












   ???     ???   ???   ??£   
   
 
???  
 

 
??? ??? ???   
 
???  
 ???    



 ?????? 








 ??\???  


 ???????????? 0  

(0.00 sec)  

 
TextHTMLJSON ???  


3
15
4















 








 



















 







































































  

SumoMe

































































 


Beta 




 
 paiza.IO 


 ??°????????????  


?????§


???????????????


 ??\??¬???   






 
???????????¢?????? 

?????°?????? 

???  





 

























































 





C++   Split Button!   

   

 
 Main.cpp   ???  

 
+ 


 
 

 Success 



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47







        cent++;
    }
    
    while (pay >= 100){
        pay -= 100;
        cent++;
    }
    
    while (pay >= 50){
        pay -= 50;
        cent++;
    }
    
    while (pay >= 10){
        pay -= 10;
        cent++;
    }
    
    while (pay >= 5){
        pay -= 5;
        cent++;
    }
    
    while (pay >= 1){











 


??± ?????? (Ctrl-Enter)    Split Button!   












   ???     ???   ???   ??£   
   
 
???  
 

 
??? ??? ???   
 
???  
 ???    



 ?????? 








 ??\???  


 ???????????? 0  

(0.00 sec)  

 
TextHTMLJSON ???  


3
15
4















 








 



















 







































































  

SumoMe




















 


Beta 




 
 paiza.IO 


 ??°????????????  


?????§


???????????????


 ??\??¬???   






 
???????????¢?????? 

?????°?????? 

???  





 

























































 





C++   Split Button!   

   

 
 Main.cpp   ???  

 
+ 


 
 

 Success 



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47







        cent++;
    }
    
    while (pay >= 100){
        pay -= 100;
        cent++;
    }
    
    while (pay >= 50){
        pay -= 50;
        cent++;
    }
    
    while (pay >= 10){
        pay -= 10;
        cent++;
    }
    
    while (pay >= 5){
        pay -= 5;
        cent++;
    }
    
    while (pay >= 1){











 


??± ?????? (Ctrl-Enter)    Split Button!   












   ???     ???   ???   ??£   
   
 
???  
 

 
??? ??? ???   
 
???  
 ???    



 ?????? 








 ??\???  


 ???????????? 0  

(0.00 sec)  

 
TextHTMLJSON ???  


3
15
4















 








 



















 







































































  

SumoMe








































#include <iostream>
using namespace std;
int main(void){
    // Here your code !
    int n = 1;
    int pay ;

    
    while (n){
        int cent = 0;
        
        cin >>n;
        if (n==0){
            break;
        }
    

    
    pay = 1000 - n;
    
    if (pay >= 500){
        pay -= 500;
        cent++;
    }
    
    while (pay >= 100){
        pay -= 100;
        cent++;
    }
    
    while (pay >= 50){
        pay -= 50;
        cent++;
    }
    
    while (pay >= 10){
        pay -= 10;
        cent++;
    }
    
    while (pay >= 5){
        pay -= 5;
        cent++;
    }
    
    while (pay >= 1){
        pay -= 1;
        cent++;
    }
    
    cout << cent << "\n";
 
    
    }
    return 0;

}

Compiler output:
a.cc:20:4: error: extended character ° is not valid in an identifier
   20 |  ??°????????????
      |    ^
a.cc:23:6: error: extended character § is not valid in an identifier
   23 | ?????§
      |      ^
a.cc:29:4: error: stray '\' in program
   29 |  ??\??¬???
      |    ^
a.cc:29:7: error: extended character ¬ is not valid in an identifier
   29 |  ??\??¬???
      |       ^
a.cc:37:12: error: extended character ¢ is not valid in an identifier
   37 | ???????????¢??????
      |            ^
a.cc:39:6: error: extended character ° is not valid in an identifier
   39 | ?????°??????
      |      ^
a.cc:128:1: error: stray '\1' in program
  128 | <U+0001><U+0001>
      | ^~~~~~~~
a.cc:128:2: error: stray '\1' in program
  128 | <U+0001><U+0001>
      |         ^~~~~~~~
a.cc:199:3: error: extended character ± is not valid in an identifier
  199 | ??± ?????? (Ctrl-Enter)    Split Button!
      |   ^
a.cc:212:26: error: extended character £ is not valid in an identifier
  212 |    ???     ???   ???   ??£
      |                          ^
a.cc:235:4: error: stray '\' in program
  235 |  ??\???
      |    ^
a.cc:445:4: error: extended character ° is not valid in an identifier
  445 |  ??°????????????
      |    ^
a.cc:448:6: error: extended character § is not valid in an identifier
  448 | ?????§
      |      ^
a.cc:454:4: error: stray '\' in program
  454 |  ??\??¬???
      |    ^
a.cc:454:7: error: extended character ¬ is not valid in an identifier
  454 |  ??\??¬???
      |       ^
a.cc:462:12: error: extended character ¢ is not valid in an identifier
  462 | ???????????¢??????
      |            ^
a.cc:464:6: error: extended character ° is not valid in an identifier
  464 | ?????°??????
      |      ^
a.cc:553:1: error: stray '\1' in program
  553 | <U+0001><U+0001>
      | ^~~~~~~~
a.cc:553:2: error: stray '\1' in program
  553 | <U+0001><U+0001>
      |         ^~~~~~~~
a.cc:624:3: error: extended character ± is not valid in an identifier
  624 | ??± ?????? (Ctrl-Enter)    Split Button!
      |   ^
a.cc:637:26: error: extended character £ is not valid in an identifier
  637 |    ???     ???   ???   ??£
      |                          ^
a.cc:660:4: error: stray '\' in program
  660 |  ??\???
      |    ^
a.cc:825:4: error: extended character ° is not valid in an identifier
  825 |  ??°????????????
      |    ^
a.cc:828:6: error: extended character § is not valid in an identifier
  828 | ?????§
      |      ^
a.cc:834:4: error: stray '\' in program
  834 |  ??\??¬???
      |    ^
a.cc:834:7: error: extended character ¬ is not valid in an identifier
  834 |  ??\??¬???
      |       ^
a.cc:842:12: error: extended character ¢ is not valid in an identifier
  842 | ???????????¢??????
      |            ^
a.cc:844:6: error: extended character ° is not valid in an identifier
  844 | ?????°??????
      |      ^
a.cc:933:1: error: stray '\1' in program
  933 | <U+0001><U+0001>
      | ^~~~~~~~
a.cc:933:2: error: stray '\1' in program
  933 | <U+0001><U+0001>
      |         ^~~~~~~~
a.cc:1004:3: error: extended character ± is not valid in an identifier
 1004 | ??± ?????? (Ctrl-Enter)    Split Button!
      |   ^
a.cc:1017:26: error: extended character £ is not valid in an identifier
 1017 |    ???     ???   ???   ??£
      |                          ^
a.cc:1040:4: error: stray '\' in program
 1040 |  ??\???
      |    ^
a.cc:11:1: error: 'Beta' does not name a type
   11 | Beta
      | ^~~~
a.cc:162:5: error: expected declaration before '}' token
  162 |     }
      |     ^
a.cc:164:5: error: expected unqualified-id before 'while'
  164 |     while (pay >= 100){
      |     ^~~~~
a.cc:169:5: error: expected unqualified-id before 'while'
  169 |     while (pay >= 50){
      |     ^~~~~
a.cc:174:5: error: expected unqualified-id before 'while'
  174 |     while (pay >= 10){
      |     ^~~~~
a.cc:179:5: error: expected unqualified-id before 'while'
  179 |     while (pay >= 5){
      |     ^~~~~
a.cc:184:5: error: expected unqualified-id before 'while'
  184 |     while (pay >= 1){
      |     ^~~~~
a.cc:589:5: error: expected unqualified-id before 'while'
  589 |     while (pay >= 100){
      |     ^~~~~
a.cc:594:5: error: expected unqualified-id before 'while'
  594 |     while (pay >= 50){
      |     ^~~~~
a.cc:599:5: error: expected unqualified-id before 'while'
  599 |     while (pay >= 10){
      |     ^~~~~
a.cc:604:5: error: expected unqualified-id before 'while'
  604 |     while (pay >= 5){
      |     ^~~~~
a.cc:609:5: error: expected unqualified-id before 'while'
  609 |     while (pay >= 1){
      |     ^~~~~
a.cc:969:5: error: expected unqualified-id before 'while'
  969 |     while (pay >= 100){
      |     ^~~~~
a.cc:974:5: error: expected unqualified-id before 'while'
  974 |     while (pay >= 50){
      |     ^~~~~
a.cc:979:5: error: expected unqualified-id before 'while'
  979 |     while (pay >= 10){
      |     ^~~~~
a.cc:984:5: error: expected unqualified-id before 'while'
  984 |     while (pay >= 5){
      |     ^~~~~
a.cc:989:5: error: expected unqualified-id before 'while'
  989 |     while (pay >= 1){
      |     ^~~~~