http://acm.hdu.edu.cn/showproblem.php?pid=5310 题目大意:要买n个纪念品,可以单个买p元每个,可以成套买q元一套,每套有m个,求最少花费 #include<stdio.h> #include<math.h> #include<string.h> #include<stdlib.h> #define N 110 using namespace std; int main() { int t, sum, n, m,…
Souvenir  Accepts: 901  Submissions: 2743  Time Limit: 2000/1000 MS (Java/Others)  Memory Limit: 262144/262144 K (Java/Others) Problem Description Today is the 1st anniversary of BestCoder. Soda, the contest manager, wants to buy a souvenir for each…
题意:今天是BestCoder一周年纪念日. 比赛管理员Soda想要给每个参赛者准备一个纪念品. 商店里纪念品的单价是p元, 同时也可以花q元购买纪念品套装, 一个套装里有m个纪念品.今天总共有n个参赛者, Soda想要知道最少需要花多少钱才可以给每个人都准备一个纪念品. 思路:3种可能之一,要么不买套装,要么全买套装,要么留下一点点单独买其他买套装. //#include <bits/stdc++.h> #include <iostream> #include <cstri…
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=6467 简单数学题 Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 308    Accepted Submission(s): 150 Problem Description 已知 F(n)=∑i=1n(i×∑j=inCij) 求 F(n) m…
简单数学题 Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 580    Accepted Submission(s): 257 Problem Description 已知 F(n)=∑i=1n(i×∑j=inCij) 求 F(n) mod 1000000007   Input 多组输入,每组输入占一行,包含一个整数n(1 <= n <…
Souvenir Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 416    Accepted Submission(s): 270 Problem Description Today is the 1st anniversary of BestCoder. Soda, the contest manager, wants to…
p.MsoNormal { margin: 0pt; margin-bottom: .0001pt; text-align: justify; font-family: Calibri; font-size: 10.5000pt } h1 { margin-top: 5.0000pt; margin-bottom: 5.0000pt; text-align: center; font-family: 宋体; color: rgb(26,92,200); font-weight: bold; fo…
HDU 5073 Galaxy (2014 Anshan D简单数学) 题目链接http://acm.hdu.edu.cn/showproblem.php?pid=5073 Description Good news for us: to release the financial pressure, the government started selling galaxies and we can buy them from now on! The first one who bought…
Discrete Function There is a discrete function. It is specified for integer arguments from 1 to N (2 ≤ N ≤ 100000). Each value of the function is longint (signed long in C++). You have to find such two points of the function for which all points betw…
5773. [NOIP2008模拟]简单数学题 (File IO): input:math.in output:math.out Time Limits: 1000 ms  Memory Limits: 262144 KB  Detailed Limits   Goto ProblemSet Description       话说, 小X是个数学大佬,他喜欢做数学题.有一天,小X想考一考小Y.他问了小Y一道数学题.题目如下:      对于一个正整数N,存在一个正整数T(0<T<N),使得…