solution: /submissions/accepted/freek.cpp
version: 2025-02  # use this version of the generators framework

test_group.yaml:
  # One or more of:
  # case_sensitive
  # space_change_sensitive
  # float_absolute_tolerance eps
  # float_relative_tolerance eps
  # float_tolerance eps
  output_validator_args: ["float_tolerance", "1e-6"]

data:
  sample:
    data:
      - '':
          in: "12345"
          ans: "5.4321"
      - '':
          in: "777777"
          ans: "42"
      - '':
          in: "31415926535897932384626433832795028841971693993751"
          ans: "141.5189"

  secret:
    data:
      - manual:
          in: "0"
      - manual:
          in: "1"
      - manual:
          in: "2"
      - manual:
          in: "3"
      - manual:
          in: "4"
      - manual:
          in: "5"
      - manual:
          in: "6"
      - manual:
          in: "7"
      - manual:
          in: "8"
      - manual:
          in: "9"
      - manual:
          in: "10"
      - manual:
          in: "11"
      - manual:
          in: "12"
      - manual:
          in: "13"
      - manual:
          in: "14"
      - manual:
          in: "15"
      - manual:
          in: "16"
      - manual:
          in: "17"
      - manual:
          in: "18"
      - manual:
          in: "19"
      - manual:
          in: "20"
      - manual:
          in: "21"
      - manual:
          in: "22"
      - manual:
          in: "30"
      - manual:
          in: "40"
      - manual:
          in: "50"
      - manual:
          in: "60"
      - manual:
          in: "70"
      - manual:
          in: "80"
      - manual:
          in: "90"
      - manual:
          in: "99"
      - manual:
          in: "100"
      - manual:
          in: "101"
      - manual:
          in: "73845744834675069430540422627797609328794971267698823389599258346512249024617721801166563113879251174048548469277891149635364418212420313993240566268924111625189491204059116781197279"
      - manual:
          in: "6878341640433873178719452177809273639612240576125274538974732959560473404017118133433991711753995819618273327314710508557013950451615705565878677925221677353776589244159978667399985224871618666858874381031642251789919045950206901595421826604745436010083138730349887291912975110797275627414941713619984611266638721917006860861750939338739185497021469383372663787695788253456413434"
      - manual:
          in: "9088679538958166597990733574093011597616021293794851588947547009007064784138331321658715006955162050138143452170842405102485622345161989150936782510680309036076185674600829113962680219339416692997209272988709459434268557939600493848906191800085215142836396482511747045060836821328441475411544867908847574375640781426534772163533907160760419861527262158209666208977884511266460116712182192569575"
      - manual:
          in: "83068664839964541628205916277657782307925024650303282278216130777468153107275592492111314295432138803081012299083570419181705326880805516772289182332474073367596515661861138153619030322004700200899897333927335315220140018715230916091447641270401478087118305679391444163397341061792026490203205037545270703622449867524076010083484173482657943852683445524032330639170854292848628984342783076071752667861963651266951391782655197245514551548169984199137638078802398225988445912664137397442988962368470820034092817821140135367039076674712232157497913388042789204849518891083737397167525377495859531048612287263028262478283823009846094619022268222"
      - ten_pow: ten_pow.py 3
      - ten_pow: ten_pow.py 4
      - ten_pow: ten_pow.py 5
      - ten_pow: ten_pow.py 6
      - ten_pow: ten_pow.py 7
      - ten_pow: ten_pow.py 8
      - ten_pow: ten_pow.py 9
      - ten_pow: ten_pow.py 10
      - ten_pow: ten_pow.py 100
      - ten_pow: ten_pow.py 998
      - ten_pow: ten_pow.py 999
      - rep_digit: rep_digit.py 1 3
      - rep_digit: rep_digit.py 1 4
      - rep_digit: rep_digit.py 1 5
      - rep_digit: rep_digit.py 1 6
      - rep_digit: rep_digit.py 1 7
      - rep_digit: rep_digit.py 1 8
      - rep_digit: rep_digit.py 1 9
      - rep_digit: rep_digit.py 1 10
      - rep_digit: rep_digit.py 1 100
      - rep_digit: rep_digit.py 1 998
      - rep_digit: rep_digit.py 1 999
      - rep_digit: rep_digit.py 1 1000
      - rep_digit: rep_digit.py 9 3
      - rep_digit: rep_digit.py 9 4
      - rep_digit: rep_digit.py 9 5
      - rep_digit: rep_digit.py 9 6
      - rep_digit: rep_digit.py 9 7
      - rep_digit: rep_digit.py 9 8
      - rep_digit: rep_digit.py 9 9
      - rep_digit: rep_digit.py 9 10
      - rep_digit: rep_digit.py 9 100
      - rep_digit: rep_digit.py 9 998
      - rep_digit: rep_digit.py 9 999
      - rep_digit: rep_digit.py 9 1000
      - uniform: uniform.py {seed} 2
      - uniform:
          generate: uniform.py {seed} 3
          count: 4
      - uniform: uniform.py {seed} 4
      - uniform: uniform.py {seed} 5
      - uniform: uniform.py {seed} 6
      - uniform: uniform.py {seed} 7
      - uniform: uniform.py {seed} 8
      - uniform: uniform.py {seed} 9
      - uniform:
          generate: uniform.py {seed} 10
          count: 4
      - uniform:
          generate: uniform.py {seed} 100
          count: 4
      - uniform: uniform.py {seed} 998
      - uniform: uniform.py {seed} 999
      - uniform:
          generate: uniform.py {seed} 1000
          count: 4

  invalid_input:
    data:
      - 'leading_zero_1':
          in: "00"
      - 'leading_zero_2':
          in: "01"
      - 'letter':
          in: "1a3"
      - 'negative':
          in: "-1"
      - 'too_large_pow': ten_pow.py 1000
      - 'too_large_rep': rep_digit.py 9 1001
      - 'too_large_rng': uniform.py {seed} 1001

  invalid_answer:
    data:
      - 'double_point':
          in: "12345"
          ans: "5..4321"
      - 'letter':
          in: "12345"
          ans: "5a4321"

  invalid_output:
    data:
      - 'large_error':
          in: "12345"
          ans: "5.4321"
          out: "5.4329"

  valid_output:
    data:
      - 'small_error':
          in: "12345"
          ans: "5.4321"
          out: "5.432105"
