Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

贴个标程

Posted by lic_tiny at 2012-04-14 13:15:53 on Problem 3379
#include <stdio.h>
int main()
{
	int n, m, k;
	char data[10010];
	while(scanf("%d%d%d", &n, &m, &k) != EOF)
	{
		int res = 0;
		long long x = (long long)k * (m + 1);
		while(x >= 0)
		{
			if(x && x % (m + 1) == 0) res++;
			x -= x / (m + 1) + n;
		}
		scanf("%s", data);
		printf("%c\n", (data[x + n] - 'A' + res) % 26 + 'A');
	}
	return 0;
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator