Answer:
The weights are 1 kg, 3kg, 9kg and 27kg.
Step-by-step explanation:
The weights are 1 kg, 3kg, 9kg and 27kg.
 1+3+9+27= 40
 27+9+3= 39
 27+9+3-1=38
 27+9+1=37
 27+9=36
 27+9-1=35
 27+9+1-3=34
 27+9-3=33
 27+9-3-1=32
 27+3+1=31
 27+3=30
 27+3-1=29
 27+1=28
 27
 27-1=26
 27+1-3=25
 27-3=24
 27-3-1=23
 27+3+1-9=22
 27+3-9=21
 27+3-9-1=20
 Like this all the weights from 1 to 40 kg can be made using 1,3,9 and 27 kg.