About Candy Game

Can someone explain the logic for https://www.codechef.com/IPC15BMR/problems/CANGAME ??

Below is code solution to it.

#include <iostream>
using namespace std;
typedef long long int ll;
int main()
{	
 ll tc;
  scanf("%lli",&tc);
while(tc--){
ll a,b;
scanf("%lli,%dlli",&a,&b);
printf("%lli.000000\n",a*b);
}	 return 0;
 }

Can you please explain the logic behind it?? @smsubham

Question is answered here.
https://discuss.codechef.com/questions/85672/can-any-one-explain-this-easy-question-candy-game-practice-icpc-with-solution