摘要:
素数判定Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 56748Accepted Submission(s): 19499 Problem Description对于表达式n^2+n+41,当n在(x,y)范围内取整数值时(包括x,y)(-39int main(){int x,y;int fun(int a,int b);int fun1(int t);while(scanf("%d %d",&x,&y) 阅读全文
摘要:
偶数求和Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 35198Accepted Submission(s): 15300 Problem Description有一个长度为n(nint main(){int n,m;while(scanf("%d %d",&n,&m)!=EOF){int i=2,p,k,q=0,a=0;p=n;while(n>=m){k=0;for(i;i<=q+2*m;i 阅读全文
摘要:
EncodingTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 21463Accepted Submission(s): 9352 Problem DescriptionGiven a string containing only 'A' - 'Z', we could encode it using the following method:1. Each sub-string containing k sa 阅读全文
摘要:
LovekeyTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 4729Accepted Submission(s): 1525 Problem DescriptionXYZ-26进制数是一个每位都是大写字母的数字。 A、B、C、…、X、Y、Z 分别依次代表一个0 ~ 25 的数字,一个 n 位的26进制数转化成是10进制的规则如下 A0A1A2A3…An-1 的每一位代表的数字为a0a1a2a3…an-1 ,则该XYZ-26进制数的10进制值 阅读全文
摘要:
不可摸数Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6619Accepted Submission(s): 1721 Problem Descriptions(n)是正整数n的真因子之和,即小于n且整除n的因子和.例如s(12)=1+2+3+4+6=16.如果任何 数m,s(m)都不等于n,则称n为不可摸数.Input包含多组数据,首先输入T,表示有T组数据.每组数据1行给出n(2 int test(int k) { int sum=0. 阅读全文