摘要: Description A number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.Given A, B, and n, you are to calcu 阅读全文
posted @ 2017-04-06 00:22 limyel 阅读(199) 评论(0) 推荐(0) 编辑
摘要: Description Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the 阅读全文
posted @ 2017-04-06 00:13 limyel 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Description Farmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needs N (1 ≤ N ≤ 20,00 阅读全文
posted @ 2017-03-28 00:45 limyel 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Description I bet, except Fat Brothers, all of you don’t like strange way to show integers , he is really like this way to showing integers: 1 -> ‘A’ 阅读全文
posted @ 2017-03-26 17:49 limyel 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Description 话说现在猪肉价格这么贵,著名的ACBoy 0068 也开始了养猪生活。说来也奇怪,他养的猪一出生第二天开始就能每天中午生一只小猪,而且生下来的竟然都是母猪。不过光生小猪也不行,0068采用了一个很奇特的办法来管理他的养猪场:对于每头刚出生的小猪,在他生下第二头小猪后立马被杀掉 阅读全文
posted @ 2017-03-26 17:25 limyel 阅读(196) 评论(0) 推荐(0) 编辑
摘要: Description Give you a lot of positive integers, just to find out how many prime numbers there are. Input There are a lot of cases. In each case, ther 阅读全文
posted @ 2017-03-26 17:21 limyel 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Description Calculate S(n).S(n)=13+23 +33 +......+n3 . Input Each line will contain one integer N(1 < n < 1000000000). Process to end of file. Output 阅读全文
posted @ 2017-03-26 14:08 limyel 阅读(187) 评论(0) 推荐(0) 编辑
摘要: Description 求两个不超过200位的非负整数的积。 Input 有两行,每行是一个不超过200位的非负整数,没有多余的前导0。 Output 一行,即相乘后的结果。结果里不能有多余的前导0,即如果结果是342,那么就不能输出为0342。 Sample Input 12345678900 9 阅读全文
posted @ 2017-03-25 21:26 limyel 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Description I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. Input The first line of the i 阅读全文
posted @ 2017-03-24 22:16 limyel 阅读(144) 评论(0) 推荐(0) 编辑
摘要: Description Fat Brother is a famous prophet, One day he get a prediction that disaster will come after X days. He is too nervous that sudden die. Fort 阅读全文
posted @ 2017-03-22 16:24 limyel 阅读(125) 评论(0) 推荐(0) 编辑