Skip to content

Commit c0eebd4

Browse files
committed
Added 1646A - Square Counting.cpp
1 parent f6ec91c commit c0eebd4

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

1646A - Square Counting.cpp

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// ॐ नमः शिवाय
2+
#include<bits/stdc++.h>
3+
using namespace std;
4+
5+
#define ll long long
6+
#define pb push_back
7+
#define ff first
8+
#define ss second
9+
#define mp make_pair
10+
11+
// Code Written By: Vikash Patel
12+
// Codeforces Profile: https://codeforces.com/profile/vikashpatel
13+
14+
ll solve()
15+
{
16+
ll n, s;
17+
cin>>n>>s;
18+
if(s == 0)
19+
return 0;
20+
ll sq = n*n;
21+
if(s<sq)
22+
return 0;
23+
else
24+
return s/sq;
25+
}
26+
27+
int main()
28+
{
29+
ios_base::sync_with_stdio(0);
30+
cin.tie(0);
31+
cout.tie(0);
32+
33+
// #ifndef ONLINE_JUDGE
34+
// freopen("input.txt", "r", stdin);
35+
// freopen("/Users/vikash/Desktop/output.txt", "w", stdout);
36+
// #endif
37+
38+
int t;
39+
cin>>t;
40+
while(t--)
41+
{
42+
cout<<solve()<<endl;
43+
}
44+
return 0;
45+
}

0 commit comments

Comments
 (0)