fork download
  1. /*
  2.   Author: Anas
  3.   Date: 17-09-2024
  4.   Time: 14:07:22
  5.   File: B_Three_Brothers.cpp
  6. */
  7. #include <bits/stdc++.h>
  8. using namespace std;
  9.  
  10. using ll = long long;
  11.  
  12. int main()
  13. {
  14. ios::sync_with_stdio(false);
  15. cin.tie(NULL);
  16.  
  17. ll t = 1;
  18. // cin >> t;
  19.  
  20. auto Anas = [&]()
  21. {
  22. ll a, b;
  23. cin >> a >> b;
  24. vector<pair<ll, bool>> v = {{1, false}, {2, false}, {3, false}};
  25. for (ll i = 0; i < 3; i++)
  26. {
  27. if (a == v[i].first)
  28. {
  29. v[i].second = true;
  30. }
  31. if (b == v[i].first)
  32. {
  33. v[i].second = true;
  34. }
  35. }
  36. for (ll i = 0; i < 3; i++)
  37. {
  38. if (v[i].second == false)
  39. {
  40. cout << v[i].first;
  41. break;
  42. }
  43. }
  44. };
  45.  
  46. while (t--)
  47. {
  48. Anas();
  49. }
  50.  
  51. return 0;
  52. }
Success #stdin #stdout 0.01s 5276KB
stdin
Standard input is empty
stdout
1