My algorithm uses brute force to generate all posibilities and then prints the ones that give 2000 as the answer.. but the judge gives WA.

Can someone with AC please verify my output? Thank you!

input:

Code: Select all

```
398418986=
29961250=
268369264=
128833027=
72492121=
569334384=
24593075=
527215732=
957667301=
20633440=
8400519=
82820233=
042872620=
196314291=
298647=
476496525=
44995560=
227677387=
3722=
230428=
7935064=
34916=
110495=
923325=
5035=
06666263=
95105309=
7715=
586629=
526472=
80818=
98458=
3295=
53217=
7176044=
23829=
0652=
92481212=
091177321=
005784828=
```

my output:

Code: Select all

```
Problem 1
3+9+84+1898+6=
Problem 2
2*996+1+2+5+0=
2*996+1+2+5-0=
Problem 3
2*6+836+9*2*64=
2-6-8+3*692-64=
2-68*3-6+92*6*4=
2-68+3*692-6-4=
26*83-6*9-26*4=
Problem 4
1+2+8*83*3+0-2+7=
1+2+8*83*3-0-2+7=
1-2+8*83*3+0+2+7=
1-2+8*83*3-0+2+7=
Problem 5
72-4+92*1*21=
Problem 6
569+33*43+8+4=
Problem 7
245*9-30*7+5=
Problem 8
527+215*7-32=
Problem 9
9+5*7*6*6+730+1=
9-5-7-6+67*30-1=
Problem 10
2*0+6*334-4+0=
2*0+6*334-4-0=
Problem 11
8+400*5+1-9=
Problem 12
8-28+2023-3=
Problem 13
0-4+28*72-6*2+0=
0-4+28*72-6*2-0=
Problem 14
1963+14*2+9*1=
Problem 15
2*986+4*7=
Problem 16
4+7*6*49-65-2+5=
4+7+64+965*2-5=
476-4*9+6*52*5=
Problem 17
4*499+5+5-6+0=
4*499+5+5-6-0=
Problem 18
2*27*6*7-7-3*87=
2+276*7+7+3+8*7=
2+276*7-7*3+87=
Problem 19
IMPOSSIBLE
Problem 20
IMPOSSIBLE
Problem 21
IMPOSSIBLE
Problem 22
IMPOSSIBLE
Problem 23
IMPOSSIBLE
Problem 24
IMPOSSIBLE
Problem 25
IMPOSSIBLE
Problem 26
IMPOSSIBLE
Problem 27
IMPOSSIBLE
Problem 28
IMPOSSIBLE
Problem 29
IMPOSSIBLE
Problem 30
IMPOSSIBLE
Problem 31
IMPOSSIBLE
Problem 32
IMPOSSIBLE
Problem 33
IMPOSSIBLE
Problem 34
IMPOSSIBLE
Problem 35
IMPOSSIBLE
Problem 36
IMPOSSIBLE
Problem 37
IMPOSSIBLE
Problem 38
IMPOSSIBLE
Problem 39
IMPOSSIBLE
Problem 40
IMPOSSIBLE
```