% CANSG4
\xintFor* #1 in{\xintSeq{1}{\useKV[ClesMathAlea]{NbQ}}}\do{%
  \ChoixAlea{2}{6}{\CANSGQuatreTermeUn}%
  \ChoixAlea{3}{5}{\CANSGQuatrePartageUn}%
  \ChoixAlea{2}{4}{\CANSGQuatrePartageDeux}%
  \xdef\CANSGFoo{}%
  \foreachitem\compteur\in\ListeSommetsCAN{%
    \xdef\CANSGFoo{\CANSGFoo \ListeSommetsCAN[\compteurcnt],}%
  }%
  \MelangeListe{\CANSGFoo}{6}%
  \readlist*\ListeSommetsMelanges{\faa}%
  {\em La figure est donnée à titre indicatif.}\par Sachant que $\ListeSommetsMelanges[5]\ListeSommetsMelanges[6]=\Lg{\CANSGQuatreTermeUn}$ et que $\ListeSommetsMelanges[3]\ListeSommetsMelanges[2]=\ListeSommetsMelanges[4]\ListeSommetsMelanges[5]$, détermine la longueur $\ListeSommetsMelanges[1]\ListeSommetsMelanges[2]$.
  \begin{center}
    \begin{Geometrie}[CoinBG={u*(-2,-2)},CoinHD={u*(17,5)}]
      u:=(\mpdim{\linewidth}/(0.6cm));
      pair A,B,C,D,E,F,M[],N[];
      A=u*(0.5,0.5);
      B-A=2*u*(4+uniformdeviate(4),0);
      C=(1/\CANSGQuatrePartageDeux)[B,A];
      D-C=u*(0,1.5);
      E-D=B-C;
      F=(1/\CANSGQuatrePartageUn)[E,D];
      for k=0 upto (\CANSGQuatrePartageDeux):
      M[k]=(k/\CANSGQuatrePartageDeux)[A,B];
      trace (u*(0,-0.075)--u*(0,0.075)) shifted M[k];
      endfor;
      for k=0 upto (\CANSGQuatrePartageUn):
      N[k]=(k/\CANSGQuatrePartageUn)[D,E];
      trace (u*(0,-0.075)--u*(0,0.075)) shifted N[k];
      endfor;
      trace segment(A,B);
      trace segment(D,E);
      trace segment(D,C) dashed evenly;
      trace segment(E,B) dashed evenly;
      marque_s:=marque_s/3;
      for k=0 upto (\CANSGQuatrePartageDeux-1):
      trace Codelongueur(M[k],M[k+1],2);
      endfor;
      for k=0 upto (\CANSGQuatrePartageUn-1):
      trace Codelongueur(N[k],N[k+1],5);
      endfor;
      marque_s:=marque_s*3;
      label.bot(btex \ListeSommetsMelanges[1] etex,A);
      label.bot(btex \ListeSommetsMelanges[2] etex,B);
      label.bot(btex \ListeSommetsMelanges[3] etex,C);
      label.top(btex \ListeSommetsMelanges[4] etex,D);
      label.top(btex \ListeSommetsMelanges[5] etex,E);
      label.top(btex \ListeSommetsMelanges[6] etex,F);
      label.bot(btex \num{\CANSGQuatreTermeUn} etex,iso(F,E));
    \end{Geometrie}
  \end{center}
}
\ifboolKV[ClesCN]{AMC}{
  \ifboolKV[ClesCN]{Multi}{%
    \AMCnumericChoices{\fpeval{\CANSGQuatrePartageUn*\CANSGQuatrePartageDeux*\CANSGQuatreTermeUn}}{digits=3,decimals=0,sign=false,Tpoint={,},borderwidth=0pt,backgroundcol=lightgray,scoreexact=1}
  }{%
    \begin{reponseshoriz}
      \bonne{\Lg{\fpeval{\CANSGQuatrePartageUn*\CANSGQuatrePartageDeux*\CANSGQuatreTermeUn}}}
      \mauvaise{\Lg{\fpeval{\CANSGQuatrePartageUn*\CANSGQuatrePartageDeux+\CANSGQuatreTermeUn}}}
      \mauvaise{\Lg{\fpeval{(\CANSGQuatrePartageUn-1)*\CANSGQuatrePartageDeux*\CANSGQuatreTermeUn}}}
      \mauvaise{\Lg{\fpeval{(\CANSGQuatrePartageUn+\CANSGQuatrePartageDeux)*\CANSGQuatreTermeUn}}}
      \mauvaise{\Lg{\fpeval{\CANSGQuatrePartageDeux*\CANSGQuatreTermeUn}}}
    \end{reponseshoriz}
  }%
}{}%
