A Live Love
水。
1 #include<bits/stdc++.h> 2 3 using namespace std; 4 5 typedef long long ll; 6 const double eps = 1e-8; 7 const int INF = 0x3f3f3f3f; 8 const ll MOD = (int)1e9 + 7; 9 const int maxn = (int)1e6 + 10; 10 11 int n, m; 12 13 inline void RUN() 14 { 15 int t; 16 scanf("%d", &t); 17 while (t--) 18 { 19 scanf("%d %d", &n, &m); 20 int ans1 = m; 21 int ans2 = (n) / (n - m + 1); 22 printf("%d %d\n", ans1, ans2); 23 } 24 } 25 26 int main() 27 { 28 #ifdef LOCAL_JUDGE 29 freopen("Text.txt", "r", stdin); 30 #endif // LOCAL_JUDGE 31 32 RUN(); 33 34 #ifdef LOCAL_JUDGE 35 fclose(stdin); 36 #endif // LOCAL_JUDGE 37 return 0; 38 }