![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数论
踢到火星
我是我生命的主宰
展开
-
Polycarp and Div 3
Polycarp likes numbers that are divisible by 3.He has a huge number ss. Polycarp wants to cut from it the maximum number of numbers that are divisible by 33. To do this, he makes an arbitrary number...原创 2018-07-29 12:04:55 · 155 阅读 · 0 评论 -
A Simple Math Problem
Lele now is thinking about a simple function f(x). If x < 10 f(x) = x. If x >= 10 f(x) = a0 * f(x-1) + a1 * f(x-2) + a2 * f(x-3) + …… + a9 * f(x-10); And ai(0<=i<=9) can only be 0 or 1 ...原创 2018-07-29 12:09:49 · 382 阅读 · 0 评论 -
Tr A
A为一个方阵,则Tr A表示A的迹(就是主对角线上各项的和),现要求Tr(A^k)%9973。 Input数据的第一行是一个T,表示有T组数据。 每组数据的第一行有n(2 <= n <= 10)和k(2 <= k < 10^9)两个数据。接下来有n行,每行有n个数据,每个数据的范围是[0,9],表示方阵A的内容。 Output对应每组数据,输出Tr(A^k...原创 2018-07-29 12:26:51 · 178 阅读 · 0 评论 -
Funky Numbers
As you very well know, this year's funkiest numbers are so called triangular numbers (that is, integers that are representable as , where k is some positive integer), and the coolest numbers are those...原创 2018-07-29 12:43:11 · 298 阅读 · 1 评论 -
C Looooops
A Compiler Mystery: We are given a C-language style for loop of type for (variable = A; variable != B; variable += C) statement;I.e., a loop which starts by setting variable to value A and wh...原创 2018-07-29 12:56:41 · 200 阅读 · 0 评论 -
Magic Five
There is a long plate s containing n digits. Iahub wants to delete some digits (possibly none, but he is not allowed to delete all the digits) to form his "magic number" on the plate, a number that is...原创 2018-07-29 13:05:53 · 270 阅读 · 0 评论 -
Largest prime factor
Everybody knows any number can be combined by the prime number. Now, your task is telling me what position of the largest prime factor. The position of prime 2 is 1, prime 3 is 2, and prime 5 is 3, ...原创 2018-07-29 13:11:20 · 312 阅读 · 0 评论 -
A - 2^x mod n = 1
Give a number n, find the minimum x(x>0) that satisfies 2^x mod n = 1. InputOne positive integer on each line, the value of n. OutputIf the minimum x exists, print a line with 2^x mod n = 1...原创 2018-07-26 16:17:39 · 131 阅读 · 0 评论 -
Reading comprehension
Read the program below carefully then answer the question. #pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include<iostream> #include <cstring> #inclu...原创 2018-07-26 16:33:07 · 657 阅读 · 0 评论