You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
296 B

  1. template TestConstraints(n) {
  2. signal input in;
  3. signal output out;
  4. signal intermediate[n];
  5. intermediate[0] <== in;
  6. for (var i=1; i<n; i++) {
  7. intermediate[i] <== intermediate[i-1] * intermediate[i-1] + i;
  8. }
  9. out <== intermediate[n-1];
  10. }
  11. component main = TestConstraints(10000);