Run ID:105549
提交时间:2025-01-13 20:56:35
#include <iostream> using namespace std; int main(){ int t; long long n,dis,j,speed; cin>>t; while(t--) { cin>>n; speed =1 ; dis = speed; for(j=1;j<=n-1;j++) { speed = speed +2; dis = dis + speed; } cout<< dis%10000<<endl; } return 0; }