U E D R , A S I H C RSS

JumpJump/김태진 (rev. 1.2)

Jump Jump/김태진

Jump! Jump!

  • Jump
  • 점화식. 3step까지 개수를 한번 체크해봐요.

//
//  main.cpp
//  codersHigh2013
//
//  Created by Jereneal Kim on 13. 7. 30..
//  Copyright (c) 2013년 Jereneal Kim. All rights reserved.
//

#include <iostream>
using namespace std;
int main(int argc, const char * argv[])
{
	long long int sum;
	int T,n;
	scanf("%d",&T);
	for(int iter=0;iter<T;iter++){
		scanf("%d",&n);
		n++;
		sum = ((n-1)*n)/2 +1;
		sum*=sum;
		sum%=20130728;
		printf("%lld\n",sum);
	}
    return 0;
}
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:23:35
Processing time 0.0207 sec