package stableswap

// Mathematica Test Cases for 3 coins
//
// ds[x1_,x2_,x3_,A_]:=Module[{d,r,k},r=NSolve[A*27*(x1+x2+x3)+d-A*27*d-d^(4)/27/x1/x2/x3,d,Reals,WorkingPrecision->100];k=IntegerPart[d/.r];Print[{x1,x2,x3,Select[k,#>0&][[1]]}]]
// dd=Table[ds[i1*10^21,i2*10^21,i3*10^21,15],{i1,1,5},{i2,1,5},{i3,1,5}]
var ThreeCoinTestCases [][]string = [][]string{
	{"1000000000000000000000", "1000000000000000000000", "1000000000000000000000", "3000000000000000000000"},
	{"1000000000000000000000", "1000000000000000000000", "2000000000000000000000", "3998187734904039643733"},
	{"1000000000000000000000", "1000000000000000000000", "3000000000000000000000", "4993378082962246621860"},
	{"1000000000000000000000", "1000000000000000000000", "4000000000000000000000", "5985435865189416134648"},
	{"1000000000000000000000", "1000000000000000000000", "5000000000000000000000", "6973955520632703312711"},
	{"1000000000000000000000", "2000000000000000000000", "1000000000000000000000", "3998187734904039643733"},
	{"1000000000000000000000", "2000000000000000000000", "2000000000000000000000", "4998073947332798319835"},
	{"1000000000000000000000", "2000000000000000000000", "3000000000000000000000", "5995113928792398913703"},
	{"1000000000000000000000", "2000000000000000000000", "4000000000000000000000", "6989969881886394221744"},
	{"1000000000000000000000", "2000000000000000000000", "5000000000000000000000", "7982577600692691468751"},
	{"1000000000000000000000", "3000000000000000000000", "1000000000000000000000", "4993378082962246621860"},
	{"1000000000000000000000", "3000000000000000000000", "2000000000000000000000", "5995113928792398913703"},
	{"1000000000000000000000", "3000000000000000000000", "3000000000000000000000", "6992967787820906937056"},
	{"1000000000000000000000", "3000000000000000000000", "4000000000000000000000", "7988686596589328391187"},
	{"1000000000000000000000", "3000000000000000000000", "5000000000000000000000", "8982489378722752093527"},
	{"1000000000000000000000", "4000000000000000000000", "1000000000000000000000", "5985435865189416134648"},
	{"1000000000000000000000", "4000000000000000000000", "2000000000000000000000", "6989969881886394221744"},
	{"1000000000000000000000", "4000000000000000000000", "3000000000000000000000", "7988686596589328391187"},
	{"1000000000000000000000", "4000000000000000000000", "4000000000000000000000", "8984935471642750299222"},
	{"1000000000000000000000", "4000000000000000000000", "5000000000000000000000", "9979293045949747636708"},
	{"1000000000000000000000", "5000000000000000000000", "1000000000000000000000", "6973955520632703312711"},
	{"1000000000000000000000", "5000000000000000000000", "2000000000000000000000", "7982577600692691468751"},
	{"1000000000000000000000", "5000000000000000000000", "3000000000000000000000", "8982489378722752093527"},
	{"1000000000000000000000", "5000000000000000000000", "4000000000000000000000", "9979293045949747636708"},
	{"1000000000000000000000", "5000000000000000000000", "5000000000000000000000", "10974043649611107520428"},
	{"2000000000000000000000", "1000000000000000000000", "1000000000000000000000", "3998187734904039643733"},
	{"2000000000000000000000", "1000000000000000000000", "2000000000000000000000", "4998073947332798319835"},
	{"2000000000000000000000", "1000000000000000000000", "3000000000000000000000", "5995113928792398913703"},
	{"2000000000000000000000", "1000000000000000000000", "4000000000000000000000", "6989969881886394221744"},
	{"2000000000000000000000", "1000000000000000000000", "5000000000000000000000", "7982577600692691468751"},
	{"2000000000000000000000", "2000000000000000000000", "1000000000000000000000", "4998073947332798319835"},
	{"2000000000000000000000", "2000000000000000000000", "2000000000000000000000", "6000000000000000000000"},
	{"2000000000000000000000", "2000000000000000000000", "3000000000000000000000", "6998994463534369711562"},
	{"2000000000000000000000", "2000000000000000000000", "4000000000000000000000", "7996375469808079287467"},
	{"2000000000000000000000", "2000000000000000000000", "5000000000000000000000", "8992305683312416560277"},
	{"2000000000000000000000", "3000000000000000000000", "1000000000000000000000", "5995113928792398913703"},
	{"2000000000000000000000", "3000000000000000000000", "2000000000000000000000", "6998994463534369711562"},
	{"2000000000000000000000", "3000000000000000000000", "3000000000000000000000", "7998951568500447452901"},
	{"2000000000000000000000", "3000000000000000000000", "4000000000000000000000", "8997246008109686249667"},
	{"2000000000000000000000", "3000000000000000000000", "5000000000000000000000", "9994263918204225289237"},
	{"2000000000000000000000", "4000000000000000000000", "1000000000000000000000", "6989969881886394221744"},
	{"2000000000000000000000", "4000000000000000000000", "2000000000000000000000", "7996375469808079287467"},
	{"2000000000000000000000", "4000000000000000000000", "3000000000000000000000", "8997246008109686249667"},
	{"2000000000000000000000", "4000000000000000000000", "4000000000000000000000", "9996147894665596639671"},
	{"2000000000000000000000", "4000000000000000000000", "5000000000000000000000", "10993748294182400419198"},
	{"2000000000000000000000", "5000000000000000000000", "1000000000000000000000", "7982577600692691468751"},
	{"2000000000000000000000", "5000000000000000000000", "2000000000000000000000", "8992305683312416560277"},
	{"2000000000000000000000", "5000000000000000000000", "3000000000000000000000", "9994263918204225289237"},
	{"2000000000000000000000", "5000000000000000000000", "4000000000000000000000", "10993748294182400419198"},
	{"2000000000000000000000", "5000000000000000000000", "5000000000000000000000", "11991787145216717847036"},
	{"3000000000000000000000", "1000000000000000000000", "1000000000000000000000", "4993378082962246621860"},
	{"3000000000000000000000", "1000000000000000000000", "2000000000000000000000", "5995113928792398913703"},
	{"3000000000000000000000", "1000000000000000000000", "3000000000000000000000", "6992967787820906937056"},
	{"3000000000000000000000", "1000000000000000000000", "4000000000000000000000", "7988686596589328391187"},
	{"3000000000000000000000", "1000000000000000000000", "5000000000000000000000", "8982489378722752093527"},
	{"3000000000000000000000", "2000000000000000000000", "1000000000000000000000", "5995113928792398913703"},
	{"3000000000000000000000", "2000000000000000000000", "2000000000000000000000", "6998994463534369711562"},
	{"3000000000000000000000", "2000000000000000000000", "3000000000000000000000", "7998951568500447452901"},
	{"3000000000000000000000", "2000000000000000000000", "4000000000000000000000", "8997246008109686249667"},
	{"3000000000000000000000", "2000000000000000000000", "5000000000000000000000", "9994263918204225289237"},
	{"3000000000000000000000", "3000000000000000000000", "1000000000000000000000", "6992967787820906937056"},
	{"3000000000000000000000", "3000000000000000000000", "2000000000000000000000", "7998951568500447452901"},
	{"3000000000000000000000", "3000000000000000000000", "3000000000000000000000", "9000000000000000000000"},
	{"3000000000000000000000", "3000000000000000000000", "4000000000000000000000", "9999294154854907748694"},
	{"3000000000000000000000", "3000000000000000000000", "5000000000000000000000", "10997428363670498704823"},
	{"3000000000000000000000", "4000000000000000000000", "1000000000000000000000", "7988686596589328391187"},
	{"3000000000000000000000", "4000000000000000000000", "2000000000000000000000", "8997246008109686249667"},
	{"3000000000000000000000", "4000000000000000000000", "3000000000000000000000", "9999294154854907748694"},
	{"3000000000000000000000", "4000000000000000000000", "4000000000000000000000", "10999272084399059563523"},
	{"3000000000000000000000", "4000000000000000000000", "5000000000000000000000", "11998040491392219453928"},
	{"3000000000000000000000", "5000000000000000000000", "1000000000000000000000", "8982489378722752093527"},
	{"3000000000000000000000", "5000000000000000000000", "2000000000000000000000", "9994263918204225289237"},
	{"3000000000000000000000", "5000000000000000000000", "3000000000000000000000", "10997428363670498704823"},
	{"3000000000000000000000", "5000000000000000000000", "4000000000000000000000", "11998040491392219453928"},
	{"3000000000000000000000", "5000000000000000000000", "5000000000000000000000", "12997295876329528722806"},
	{"4000000000000000000000", "1000000000000000000000", "1000000000000000000000", "5985435865189416134648"},
	{"4000000000000000000000", "1000000000000000000000", "2000000000000000000000", "6989969881886394221744"},
	{"4000000000000000000000", "1000000000000000000000", "3000000000000000000000", "7988686596589328391187"},
	{"4000000000000000000000", "1000000000000000000000", "4000000000000000000000", "8984935471642750299222"},
	{"4000000000000000000000", "1000000000000000000000", "5000000000000000000000", "9979293045949747636708"},
	{"4000000000000000000000", "2000000000000000000000", "1000000000000000000000", "6989969881886394221744"},
	{"4000000000000000000000", "2000000000000000000000", "2000000000000000000000", "7996375469808079287467"},
	{"4000000000000000000000", "2000000000000000000000", "3000000000000000000000", "8997246008109686249667"},
	{"4000000000000000000000", "2000000000000000000000", "4000000000000000000000", "9996147894665596639671"},
	{"4000000000000000000000", "2000000000000000000000", "5000000000000000000000", "10993748294182400419198"},
	{"4000000000000000000000", "3000000000000000000000", "1000000000000000000000", "7988686596589328391187"},
	{"4000000000000000000000", "3000000000000000000000", "2000000000000000000000", "8997246008109686249667"},
	{"4000000000000000000000", "3000000000000000000000", "3000000000000000000000", "9999294154854907748694"},
	{"4000000000000000000000", "3000000000000000000000", "4000000000000000000000", "10999272084399059563523"},
	{"4000000000000000000000", "3000000000000000000000", "5000000000000000000000", "11998040491392219453928"},
	{"4000000000000000000000", "4000000000000000000000", "1000000000000000000000", "8984935471642750299222"},
	{"4000000000000000000000", "4000000000000000000000", "2000000000000000000000", "9996147894665596639671"},
	{"4000000000000000000000", "4000000000000000000000", "3000000000000000000000", "10999272084399059563523"},
	{"4000000000000000000000", "4000000000000000000000", "4000000000000000000000", "12000000000000000000000"},
	{"4000000000000000000000", "4000000000000000000000", "5000000000000000000000", "12999454294279333752166"},
	{"4000000000000000000000", "5000000000000000000000", "1000000000000000000000", "9979293045949747636708"},
	{"4000000000000000000000", "5000000000000000000000", "2000000000000000000000", "10993748294182400419198"},
	{"4000000000000000000000", "5000000000000000000000", "3000000000000000000000", "11998040491392219453928"},
	{"4000000000000000000000", "5000000000000000000000", "4000000000000000000000", "12999454294279333752166"},
	{"4000000000000000000000", "5000000000000000000000", "5000000000000000000000", "13999440902354383956802"},
	{"5000000000000000000000", "1000000000000000000000", "1000000000000000000000", "6973955520632703312711"},
	{"5000000000000000000000", "1000000000000000000000", "2000000000000000000000", "7982577600692691468751"},
	{"5000000000000000000000", "1000000000000000000000", "3000000000000000000000", "8982489378722752093527"},
	{"5000000000000000000000", "1000000000000000000000", "4000000000000000000000", "9979293045949747636708"},
	{"5000000000000000000000", "1000000000000000000000", "5000000000000000000000", "10974043649611107520428"},
	{"5000000000000000000000", "2000000000000000000000", "1000000000000000000000", "7982577600692691468751"},
	{"5000000000000000000000", "2000000000000000000000", "2000000000000000000000", "8992305683312416560277"},
	{"5000000000000000000000", "2000000000000000000000", "3000000000000000000000", "9994263918204225289237"},
	{"5000000000000000000000", "2000000000000000000000", "4000000000000000000000", "10993748294182400419198"},
	{"5000000000000000000000", "2000000000000000000000", "5000000000000000000000", "11991787145216717847036"},
	{"5000000000000000000000", "3000000000000000000000", "1000000000000000000000", "8982489378722752093527"},
	{"5000000000000000000000", "3000000000000000000000", "2000000000000000000000", "9994263918204225289237"},
	{"5000000000000000000000", "3000000000000000000000", "3000000000000000000000", "10997428363670498704823"},
	{"5000000000000000000000", "3000000000000000000000", "4000000000000000000000", "11998040491392219453928"},
	{"5000000000000000000000", "3000000000000000000000", "5000000000000000000000", "12997295876329528722806"},
	{"5000000000000000000000", "4000000000000000000000", "1000000000000000000000", "9979293045949747636708"},
	{"5000000000000000000000", "4000000000000000000000", "2000000000000000000000", "10993748294182400419198"},
	{"5000000000000000000000", "4000000000000000000000", "3000000000000000000000", "11998040491392219453928"},
	{"5000000000000000000000", "4000000000000000000000", "4000000000000000000000", "12999454294279333752166"},
	{"5000000000000000000000", "4000000000000000000000", "5000000000000000000000", "13999440902354383956802"},
	{"5000000000000000000000", "5000000000000000000000", "1000000000000000000000", "10974043649611107520428"},
	{"5000000000000000000000", "5000000000000000000000", "2000000000000000000000", "11991787145216717847036"},
	{"5000000000000000000000", "5000000000000000000000", "3000000000000000000000", "12997295876329528722806"},
	{"5000000000000000000000", "5000000000000000000000", "4000000000000000000000", "13999440902354383956802"},
	{"5000000000000000000000", "5000000000000000000000", "5000000000000000000000", "15000000000000000000000"},
}
