找规律
Ypopstar
这个作者很懒,什么都没留下…
展开
-
HDOJ--1005--Number Sequence
题目描述: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 calculate the value of f(n).输入描述:The input consists of mu...原创 2020-05-04 19:23:37 · 305 阅读 · 0 评论 -
HDOJ--1061--Rightmost Digit
题目描述:Given a positive integer N, you should output the most right digit of N^N.输入描述:The input contains several test cases. The first line of the input is a single integer T which is the number of t...原创 2020-05-04 19:22:21 · 140 阅读 · 1 评论 -
Codeforces--1326B--Maximums
题目描述:Alicia has an array, a1,a2,…,an, of non-negative integers. For each 1≤i≤n, she has found a non-negative integer xi=max(0,a1,…,ai−1). Note that for i=1, xi=0.For example, if Alicia had the array...原创 2020-04-17 22:22:21 · 214 阅读 · 0 评论 -
Codeforces--1328B--K-th Beautiful String
题目描述:For the given integer n (n>2) let’s write down all the strings of length n which contain n−2 letters ‘a’ and two letters ‘b’ in lexicographical (alphabetical) order.Recall that the string s ...原创 2020-04-16 23:09:44 · 162 阅读 · 0 评论 -
HDOJ--2073--无限的路
题目描述:甜甜从小就喜欢画图画,最近他买了一支智能画笔,由于刚刚接触,所以甜甜只会用它来画直线,于是他就在平面直角坐标系中画出如下的图形:甜甜的好朋友蜜蜜发现上面的图还是有点规则的,于是他问甜甜:在你画的图中,我给你两个点,请你算一算连接两点的折线长度(即沿折线走的路线长度)吧。输入描述:第一个数是正整数N(≤100)。代表数据的组数。每组数据由四个非负整数组成x1,y1,x2,y2;所...原创 2020-04-14 22:51:50 · 103 阅读 · 0 评论 -
牛客网--26213--小雨的三角形
题目描述:小雨手上有一个填满了数字的三角形。这个三角形一共有 nn 层,其中第 ii 层共有 ii个数,且第 11 个数和第 ii 个数均为 ii 。其余的数中,第 jj 个数是上一层中第 j-1j−1 个数和第 jj 个数的和。小雨想知道这个三角形第 xx 层到第 yy 层所有数的和,一共有 mm 个询问。输入描述:第一行两个正整数 n,mn,m,表示这个三角形的层数和询问个数。接下来 ...原创 2020-04-13 11:04:53 · 221 阅读 · 0 评论 -
HDOJ--4811--Ball
题目描述:Jenny likes balls. He has some balls and he wants to arrange them in a row on the table.Each of those balls can be one of three possible colors: red, yellow, or blue. More precisely, Jenny has ...原创 2020-04-02 14:54:11 · 128 阅读 · 0 评论 -
牛客网--14520--有趣的数学
题目描述:在刚刚过去的双11,对于别人来说是一个购物的节日,然而对于CJJ来说,确是一个单身狗的光棍节,所以他只能一个人默默的刷题。现在,CJJ学长遇到了一个数学问题,如果一个数的三次方的后两位是11,那么他将其称之为“单身数”,他知道了第一个“单身数”是71,CJJ学长想知道第n个“单身数”是多少。输入描述:输入一个正整数T(T<=100),表示有T组数据,每组数据包括一个整数n(...原创 2020-03-29 12:35:13 · 196 阅读 · 0 评论 -
Codeforces--1288B--Yet Another Meme Problem
题目描述:Try guessing the statement from this picture http://tiny.cc/ogyoiz.You are given two integers A and B, calculate the number of pairs (a,b) such that 1≤a≤A, 1≤b≤B, and the equation a⋅b+a+b=conc(...原创 2020-03-21 20:03:04 · 140 阅读 · 0 评论 -
Codeforces--1213C--Book Reading
题目描述:Polycarp is reading a book consisting of n pages numbered from 1 to n. Every time he finishes the page with the number divisible by m, he writes down the last digit of this page number. For exam...原创 2020-03-21 11:50:03 · 361 阅读 · 0 评论 -
Codeforces--166E--Tetrahedron
题目描述:You are given a tetrahedron. Let’s mark its vertices with letters A, B, C and D correspondingly.An ant is standing in the vertex D of the tetrahedron. The ant is quite active and he wouldn’t st...原创 2020-03-21 09:51:35 · 210 阅读 · 0 评论 -
Codeforces--465B--Fedya and Maths
题目描述:Fedya studies in a gymnasium. Fedya’s maths hometask is to calculate the following expression:(1n + 2n + 3n + 4n) mod 5for given value of n. Fedya managed to complete the task. Can you? Note t...原创 2020-03-19 20:16:04 · 209 阅读 · 0 评论 -
Codeforces--949B--A Leapfrog in the Array
题目描述:Dima is a beginner programmer. During his working process, he regularly has to repeat the following operation again and again: to remove every second element from the array. One day he has been ...原创 2020-03-19 13:33:33 · 84 阅读 · 0 评论 -
Codeforces--976B--Lara Croft and the New Game
题目描述:You might have heard about the next game in Lara Croft series coming out this year. You also might have watched its trailer. Though you definitely missed the main idea about its plot, so let me ...原创 2020-03-18 14:58:50 · 157 阅读 · 0 评论