与‘数论-欧拉函数’有关的日志

poj3090

maksyuki 发表于 oj 分类,标签:
0
poj3090

Visible Lattice Points

A lattice point (xy) in the first quadrant (x and y are integers greater than or equal to 0), other than the origin, is visible from the origin if the line from (0, 0) to (xy) does not pass through any other lattice point >>继续阅读

poj2478

maksyuki 发表于 oj 分类,标签:
0
poj2478

Farey Sequence

The Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible rational numbers a/b with 0 < a < b <= n and gcd(a,b) = 1 arranged in increasing order. The first few are

F2 = {1/2}

F3 = {1/3, 1/2, 2/3} >>继续阅读

poj1284

maksyuki 发表于 oj 分类,标签:
0
poj1284

Primitive Roots

We say that integer x, 0 < x < p, is a primitive root modulo odd prime p if and only if the set { (xi mod p) | 1 <= i <= p-1 } is equal to { 1, ..., p-1 }. For example, the consecutive powers of 3 modulo 7 are 3, 2, 6, 4 >>继续阅读

hdu3501

maksyuki 发表于 oj 分类,标签:
0
hdu3501

Calculation 2

Problem Description

Given a positive integer N, your task is to calculate the sum >>继续阅读

uva11424

maksyuki 发表于 oj 分类,标签:
0
uva11424

Given the value of N, you will have to find the value of G. The definition of G is given below:G =i<N∑i=1j∑≤Nj=i+1GCD(i, j) Here GCD(i, j) means the greatest common divisor of integer i and integer j.

For those who have trouble understanding sum >>继续阅读

lightoj1007

maksyuki 发表于 oj 分类,标签:
0
lightoj1007

1007 - Mathematically Hard

In this problem, you will be given two integers a and b. You have to find the summation of the scores of the numbers from a to b (inclusive). The score of a number is defined as the following function.Mathematically some >>继续阅读

bzoj2818

maksyuki 发表于 oj 分类,标签:
0
bzoj2818

2818: Gcd

Description

给定整数N,求1<=x,y<=N且Gcd(x,y)为素数的数对(x,y)有多少对.

Input

一个整数N

>>继续阅读

bzoj2705

maksyuki 发表于 oj 分类,标签:
0
bzoj2705

2705: [SDOI2012]Longge的问题

Description

Longge的数学成绩非常好,并且他非常乐于挑战高难度的数学问题。现在问题来了:给定一个整数N,你需要求出∑gcd(i, N)(1<=i <=N)。

Input

一个整数,为N。

>>继续阅读

bzoj2190

maksyuki 发表于 oj 分类,标签:
0
bzoj2190

2190: [SDOI2008]仪仗队

Description

作为体育委员,C君负责这次运动会仪仗队的训练。仪仗队是由学生组成的N * N的方阵,为了保证队伍在行进中整齐划一,C君会跟在仪仗队的左后方,根据其视线所及的学生人数来判断队伍是否整齐(如下图)。 现在,C君希望你告诉他队伍整齐时能看到的学生人数。

>>继续阅读

sgu102

maksyuki 发表于 oj 分类,标签:
0
sgu102

Coprimes

For given integer N (1<=N<=104) find amount of positive numbers not greater than N that coprime with N. Let us call two positive integers (say, A and B, for example) coprime if (and only if) their greatest common divisor is 1. >>继续阅读