Create 1871.cpp
parent
5bdf456d2f
commit
4da9cf8ad5
|
@ -0,0 +1,18 @@
|
|||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
int x,y,n,m;
|
||||
cin>>x>>y>>n>>m;
|
||||
while(m--)
|
||||
{
|
||||
int t;
|
||||
cin>>t;
|
||||
n+=t;
|
||||
while(n<x) n+=y-x+1;
|
||||
while(n>y) n-=y-x+1;
|
||||
cout<<n<<endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue