fork download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main() {
  6. int K, N;
  7. cin >> K >> N;
  8. int a3 = ((N - 1) + (K - 1)) % 7 + 1;
  9. cout << a3;
  10. return 0;
  11. }
Success #stdin #stdout 0.01s 5320KB
stdin
10 6
stdout
1