Practice · 6 of 9
Mixed B1
CHALLENGE
Difficulty: advanced+25 XP
**Bài toán.** For each of q queries (a, S), print the minimal integer k ≥ 0 with k·a ≥ S. Both a and S can be up to 10^9. **Constraints:** 1 ≤ q ≤ 200000; 1 ≤ a ≤ 10^6; 1 ≤ S ≤ 10^9. **Input:** line 1: q; then q lines a S. **Output:** q lines, one integer each.
Press Submit to check your solution.
Back to lesson: Practice: Mixed Sets A/B/C — Topics Hidden