代码
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,h,g=0,x1,x2;cin>>n>>h;
for(int i=1;i<=n;i++)
{
cin>>x1>>x2;
if(x1<=h)g+=x2;
}
cout<<g;
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,h,g=0,x1,x2;cin>>n>>h;
for(int i=1;i<=n;i++)
{
cin>>x1>>x2;
if(x1<=h)g+=x2;
}
cout<<g;
return 0;
}