If you have 4 jars of pills Each pill is a certain weight except for contaminated pills contained in one jar where each pill is weight 1 How could you tell which jar had the contaminated pills in j?

Weigh the following:

Given a normal pill weighs x and contaminated pill weighs x+1

4 pills from jar 1

3 pills from jar 2

2 pills from jar 3

1 pill from jar 4

Total weight if all normal: 10x

If total weight is:

10x+4 then jar 1 is contaminated

10x+3 then jar 2 is contaminated

10x+2 then jar 3 is contaminated

10x+1 then jar 4 is contaminated