Skip to content

Instantly share code, notes, and snippets.

@amolpujari
Created January 2, 2013 17:15
Show Gist options
  • Save amolpujari/4436212 to your computer and use it in GitHub Desktop.
Save amolpujari/4436212 to your computer and use it in GitHub Desktop.
Food
1405 - Amol/Renuka
184 - Omkar/Shruti
0 - Yogesh/Radhika
490 - Pushkar/Tejal
___________________
2079 that means 520 per couple
hence
yogesh -> amol 520
pushkar -> amol 30
omkar -> amol 335
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Now drinks round 1
Omkar spent 1585
Amol had asked for 2 jp, 2 cannon and 1 mcd = 510
Amol will pay 450 to Omkar
and yogesh will pay 60 (of rum) to omkar
Pushkar will pay 615 to Omkar here, I hope Tejal included here
*How much Radhika to pay to Omkar here*
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
drinks round 2
yogesh to spent 500
Pushkar spent 50
Below amounts to be paid to yogesh:
for whiskey: 330/4=82.
Omkar: 82
Amol: 82
Pushkar:82
Yogesh to get back 246 here
for beer:
220/2 (whos is 2nd consumer here? am assuming john)
so tejal pays: 110
Tejal will pay 50 to Pushakr
Tejal will pay 60 to Yogesh
john will pay 110 to Yogesh
so yogesh total get 246 + 60 + 110 = 416 here
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Cigs:
Pushkar : 116
Omkar : 50
Yogesh is to pay Rs 50/- to pushkar.
............. final hhhhhhhhisob ............
combining all payments from above all
yogesh -> amol 520
pushkar -> amol 30
omkar -> amol 335
amol -> omkar 450
yogesh -> omkar 60
pushkar -> omkar 615
amol -> yogesh 82
pushkar -> yogesh 82
omkar -> yogesh 82
tejal -> yogesh 60
john -> yogesh 110
tejal -> pushkar 50
yogesh -> pushkar 50
--------------------------- that means ->
yogesh -> amol 442 (520-82)
pushkar -> amol 30
amol -> omkar 115 (450-335)
omkar -> yogesh 12 (82-60)
pushkar -> omkar 615
pushkar -> yogesh 32 (82-50)
Tejal -> yogesh 60
tejal -> pushkar 50 **** ignoring this in total hisob ahead *****
-------------------------------
now simply coupling puks and teja
a. yogesh -> amol 442
b. pushkar -> amol 30
c. amol -> omkar 115
d. omkar -> yogesh 12
e. pushkar -> omkar 615
f. pushkar -> yogesh 92 (+60 from tejals's part)
...................................
Look at a,b amol is getting it from yogs/puks, so let make it simple for Amol by
yogesh -> amol 442 + 30 = 472
pushkar -> yogesh 92 + 30 = 122
pushkar -> amol 0
hence now
................................................
a. yogesh -> amol 472
b. pushkar -> omkar 615
c. amol -> omkar 115
d. pushkar -> yogesh 122
e. omkar -> yogesh 12
................................................
Now lets omi does not pay 12 to yogesh but to pushkar, let yogesh get it from pushkar
pushkar -> yogesh 122 + 12 = 134
omkar -> yogesh 0
pushkar -> omkar 615 - 12 = 603
hence now
...........................................
a. yogesh -> amol 472
b. pushkar -> omkar 603
c. amol -> omkar 115
d. pushkar -> yogesh 132
...........................................
I will hand over 115 to puks so
a. yogesh -> amol 472
b. pushkar -> omkar 718
c. amol -> pushkar 115
d. pushkar -> yogesh 132
...............................................
now what if I pay 132 to yogesh on behalf of pushkar, abd hence pushkar pays same to me
a. yogesh -> amol 340 (472-132)
b. pushkar -> omkar 718
c. amol -> pushkar -17 (115-132)
and yes john will pay 110 to yogesh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment