Skip to content

Instantly share code, notes, and snippets.

@enzerr

enzerr/Roda1.cpp Secret

Created August 27, 2023 03:12
Show Gist options
  • Save enzerr/682dc95eaed9d13c1b7913ecf7c1ec7f to your computer and use it in GitHub Desktop.
Save enzerr/682dc95eaed9d13c1b7913ecf7c1ec7f to your computer and use it in GitHub Desktop.
#include<bits/stdc++.h>
using namespace std;
int main(){
int N, I, P; cin >> N >> I >> P;
cout << (I+P-1)%N + 1 << '\n';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment