Twist_Nemo

three dice.cpp

Jul 30th, 2021
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. void solve() {
  5.     double x, y; cin >> x >> y;
  6.     double pos;
  7.     double ans = x+y;
  8.     if(ans >=6) cout << "0" << endl;
  9.     double c = 6 - ans;
  10.     cout << c/6 << endl;
  11.  
  12.  
  13.    
  14. }
  15.  
  16. int main() {
  17.     int t; cin >> t;
  18.      while(t--) {
  19.          solve();
  20.  
  21.      }
  22.     }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment