bfant's blog


  • 首页

  • 标签

  • 分类

  • 归档

poj1004

发表于 2018-08-16 | 分类于 poj |
字数统计: 298 | 阅读时长 ≈ 2

Title: Financial Management

Description

Larry graduated this year and finally has a job. He’s making a lot of money, but somehow never seems to have enough. Larry has decided that he needs to grab hold of his financial portfolio and solve his financing problems. The first step is to figure out what’s been going on with his money. Larry has his bank account statements and wants to see how much money he has. Help Larry by writing a program to take his closing balance from each of the past twelve months and calculate his average account balance.

阅读全文 »

poj1003

发表于 2018-08-16 | 分类于 poj |
字数统计: 368 | 阅读时长 ≈ 2

Title: Hangover

Description:

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 card overhang the bottom one by half a card length, and the bottom one overhang the table by a third of a card length, for a total maximum overhang of 1/2 + 1/3 = 5/6 card lengths. In general you can make n cards overhang by 1/2 + 1/3 + 1/4 + … + 1/(n + 1) card lengths, where the top card overhangs the second by 1/2, the second overhangs the third by 1/3, the third overhangs the fourth by 1/4, etc., and the bottom card overhangs the table by 1/(n + 1). This is illustrated in the figure below.

阅读全文 »
12

Zimeng Zhang

Oh my useless blog

12 日志
3 分类
3 标签
© 2020 Zimeng Zhang
由 Hexo 强力驱动
|
主题 — NexT.Pisces v5.1.4