func_code_string: #include <bits/stdc++.h>   using namespace std;   void solve() {     long long s, x1, x2, t1, t2, p, d;     cin >> s >> x1 >> x2 >> t1 >> t2 >> p >> d;     long long ans = abs(x1 - x2) * t2;     long long i = p, t = 0;     while (i != x1) {       i += d;       t += t1;       if (i == s)         d = -1;       else if (i == 0)         d = 1;     }     while (i != x2) {       i += d;       t += t1;       if (i == s)         d = -1;       else if (i == 0)         d = 1;     }     ans = min(ans, t);     cout << ans <<   n ;   }   void solve(bool testcase) {     long long t;     cin >> t;     while (t--) solve();   }   int32_t main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     solve();     return 0;   }   