Source Code
#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define ii pair <int,int>
#define F first
#define S second
#define ever (;;)

ll n,k,ans;

int main()
{
    scanf("%lld%lld",&n,&k);
    for(int i=1;i<=n;i++)
    {
        ll x,y;
        scanf("%lld%lld",&x,&y);

        ans += k/(x*x)*y;
    }

    printf("%lld\n",ans);
}
Copy
Number of the Beast Naseem17
GNU G++17
1 ms
508 KB
Wrong Answer