fork download
  1. unsigned char mod(unsigned char x, unsigned char y)
  2. {
  3. unsigned int a = x;
  4. unsigned int b = y;
  5. b <<= 7;
  6. for (int i = 0; i < 8; i++) {
  7. if (a >= b) {
  8. a -= b;
  9. }
  10. b >>= 1;
  11. }
  12. return (unsigned char)a;
  13. }
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty