CF1646A Solution

  1. 1. Solution

Solution

结论:

题目中,首先看到了 结果唯一。所以证明的起点就在这里。

因为 范围内的数至多有 个,最小总值为 ,最大总值为 ,所以数列中的 不能被 范围内的数代替,因此答案唯一。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include<bits/stdc++.h>
using namespace std;

int main()
{
int t;
cin>>t;
while(t--)
{
long long n,s;
cin>>n>>s;
cout<<(s/(n*n))<<endl;
}
return 0;
}