Skip to content

Instantly share code, notes, and snippets.

@enzerr

enzerr/Roda2.cpp Secret

Created August 27, 2023 03:11
Show Gist options
  • Save enzerr/198bd9e49d274ff9f049949edc5a1eb0 to your computer and use it in GitHub Desktop.
Save enzerr/198bd9e49d274ff9f049949edc5a1eb0 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;
for(int i = 1; i <= P; i++){
if(I==N) I=1;
else I++;
}
cout << I << '\n';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment