Skip to content

Instantly share code, notes, and snippets.

@modos
Created July 19, 2023 11:14
Show Gist options
  • Save modos/6ced17b825f27fd91a049576bfd3bb74 to your computer and use it in GitHub Desktop.
Save modos/6ced17b825f27fd91a049576bfd3bb74 to your computer and use it in GitHub Desktop.
باب و کلید تلویزیون
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,x,k;cin>>n>>x>>k;
for(int i=0;i<n;i++){
string s;cin>>s;
if(i==(x+k-1)%n)
return cout<<s,0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment