title: Fibonacci Modulo P
signature: fibonacciModuloP(p) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(int actual, int expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(p, int expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(p), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          51, 
          36)
      }");
  
      print("TEST-1...${driver(
          40, 
          30)
      }");
  
      print("TEST-2...${driver(
          68, 
          18)
      }");
  
      print("TEST-3...${driver(
          7, 
          8)
      }");
  
      print("TEST-4...${driver(
          8, 
          6)
      }");
  
      print("TEST-5...${driver(
          32, 
          24)
      }");
  
      print("TEST-6...${driver(
          93, 
          60)
      }");
  
      print("TEST-7...${driver(
          75, 
          100)
      }");
  
      print("TEST-8...${driver(
          71, 
          70)
      }");
  
      print("TEST-9...${driver(
          15, 
          20)
      }");
  
      return 0;
  }
source_py: def fibonacci_modulo_p(p):
      first = 1
      second = 1
      number = 2
      next = 1
      while next:
          next = ((first + second) % p)
          first = second
          second = next
          number = (number + 1)
      return number
source_cpp: int fibonacci_modulo_p(int p) {
    int first = 1, second = 1, number = 2, next = 1;
    while ( next ) {
      next = ( first + second ) % p;
      first = second;
      second = next;
      number ++;
    }
    return number;
  }