fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int x;
  6. cin>>x;
  7. x=(x-15+24)%24;
  8. /*if(x<0){
  9. x=x+24;
  10. }*/
  11. cout<<x<<endl;
  12. }
Success #stdin #stdout 0.01s 5320KB
stdin
24
stdout
9