mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
Create 1871.cpp
This commit is contained in:
parent
5bdf456d2f
commit
4da9cf8ad5
18
QUSTOJ/1871.cpp
Normal file
18
QUSTOJ/1871.cpp
Normal file
|
@ -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
Block a user