与‘基础算法-简单数学’有关的日志

uva11809

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

Floating-point numbers are represented differently in computers than integers. That is why a 32-bit floating-point number can represent values in the magnitude of 1038 while a 32-bit integer can only represent values as high as 2^32.

Although there >>继续阅读

uva1583

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

For a positive integer N, the digit-sum of N is defined as the sum of N itself and its digits. When M is the digitsum of N, we call N a generator of M.

For example, the digit-sum of 245 is 256 (= 245 + 2 + 4 + 5). Therefore, 245 is a generator of 2 >>继续阅读

uva340

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

MasterMind is a game for two players. One of them, Designer, selects a secret code. The other, Breaker, tries to break it. A code is no more than a row of colored dots. At the beginning of a game, the players agree upon the length N that a code must >>继续阅读

poj3684

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

Physics Experiment

Simon wants to know where are the N balls after T seconds. Can you help him?Simon is doing a physics experiment with N identical balls with the same radius of R centimeters. Before the experiment, all N balls are fastened within >>继续阅读

poj1546

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

Basically Speaking

The Really Neato Calculator Company, Inc. has recently hired your team to help design their Super Neato Model I calculator. As a computer scientist you suggested to the company that it would be neato if this new calculator could >>继续阅读

poj1047

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

Round and Round We Go

A cyclic number is an integer n digits in length which, when multiplied by any integer from 1 to n, yields a"cycle"of the digits of the original number. That is, if you consider the number after the last digit to "wrap around" >>继续阅读

poj1045

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

Bode Plot

Consider the AC circuit below. We will assume that the circuit is in steady-state. Thus, the voltage at nodes 1 and 2 are given >>继续阅读

poj1005

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

I Think I Need a Houseboat

Fred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land, he learned that the state of Louisiana is actually shrinking by 50 square >>继续阅读

poj1003

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

Hangover

How far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We're assuming that the cards must be perpendicular to the table.) With two cards you can make the top >>继续阅读

hdu4472

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

Count

Problem Description

Prof. Tigris is the head of an archaeological team who is currently in charge of an excavation in a site of ancient relics.

This site contains relics of a village where civilization once >>继续阅读

hdu2051

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

Bitset

Problem Description

Give you a number on base ten,you should output it on base two.(0 < n < 1000)

Input

For each case there is a postive number n on base ten, end >>继续阅读

hdu2044

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

一只小蜜蜂...

Problem Description

有一只经过训练的蜜蜂只能爬向右侧相邻的蜂房,不能反向爬行。请编程计算蜜蜂从蜂房a爬到蜂房b的可能路线数。

其中,蜂房的结构如下所示。 >>继续阅读

hdu1005

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

Number Sequence

Problem 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 calculate the value of f(n). >>继续阅读

uva1587

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

Ivan works at a factory that produces heavy machinery. He has a simple job -- he knocks up wooden boxes of different sizes to pack machinery for delivery to the customers. Each box is a rectangular parallelepiped. Ivan uses six rectangular wooden pal >>继续阅读

uva1225

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

Trung is bored with his mathematics homeworks. He takes a piece of chalk and starts writing a sequence of consecutive integers starting with 1 to N (1 < N < 10000) . After that, he counts the number of times each digit (0 to 9) appears in the s >>继续阅读

uva136

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

Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence

1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, ...

shows the first 11 ugly numbers. By convention, 1 is included.

>>继续阅读