#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int x;
    int y;
    cin >> x >> y;
    if (x % 5 == 0 && x <= y) {
      cout << y - x - 0.50 << "wow"
           << "\n";
    } else {
      cout << y << "\n";
    }
  }
  return 0;
}
Input:
3
30 120.00
42 120.00
300 120.00
Output:(When y is int)
89.5wow
119.5wow
119.5wow
Here even though the second and third case should give false and run else its instead running if itself and not only that x is not being subtracted. This error is solved by making y float. But whats the underlying issue?
Output:(When y is float)
89.5wow
120
120
 
     
    