int A =  729           ;



int B =    5           ;

















const int ledPins[] = {9, 8, 7, 6, 5, 4, 3, 2};
const int numLeds = 8;

void setup() {
  for (int i = 0; i < numLeds; i++) {
    pinMode(ledPins[i], OUTPUT);
  }
}

void loop() {
  int Remainder=A%B;
  for (int i = 0; i < Remainder; i++) {
    digitalWrite(ledPins[i], HIGH);
  }  
}