找规律
#include<bits/stdc++.h> using namespace std; int main(){ int x=0,y=0; for(int i=1;i<=2020;i++){ if(i%4==1) x+=i; if(i%4==2) y-=i; if(i%4==3) x-=i; if(i%4==0) y+=i; } cout<<x<<' '<<y<<endl; }