
简单数学题
文章平均质量分 59
nudt_oys
An AC a day,keeps WA away~
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
POJ 1995 Raising Modulo Numbers(快速幂)
Raising Modulo NumbersDescriptionPeople are different. Some secretly read magazines full of interesting girls' pictures, others create an A-bomb in their cellar, others like using Windows,原创 2016-07-21 14:58:03 · 308 阅读 · 0 评论 -
LeetCode 414 Third Maximum Number(set + priority_queue)
Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexity must be in O(n).Example 1:Input: [3, 2,原创 2017-08-29 16:58:32 · 597 阅读 · 0 评论 -
LeetCode 319 Bulb Switcher(数学Tricks)
There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, you toggle every third bulb (turning on if it's off or turning off原创 2017-07-17 13:53:37 · 677 阅读 · 0 评论 -
LeetCode 1 Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use the same原创 2017-05-31 18:30:28 · 543 阅读 · 0 评论 -
LeetCode 507 Perfect Number(完美数字)
We define the Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself.Now, given an integer n, write a function that returns true when it is a perfec原创 2017-05-29 14:57:34 · 2511 阅读 · 0 评论 -
LeetCode 35 Search Insert Position(插入排序)
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array.原创 2017-05-14 22:52:46 · 641 阅读 · 0 评论 -
LeetCode 476 Number Complement(位运算)
Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation.Note:The given integer is guaranteed to fit within the range of原创 2017-04-05 21:54:09 · 330 阅读 · 0 评论 -
LeetCode 416 Hamming Distance(位运算)
The Hamming distance between two integers is the number of positions at which the corresponding bits are different.Given two integers x and y, calculate the Hamming distance.Note:0 ≤ x, y <原创 2017-04-05 18:18:35 · 369 阅读 · 0 评论 -
UVaOJ 11877 The Coco-Cola Store(简单数学题)
Once upon a time, there is a special coco-cola store. If you return three empty bottles to the shop,you’ll get a full bottle of coco-cola to drink. If you have n empty bottles right in your hand, how原创 2016-11-23 19:11:21 · 945 阅读 · 0 评论 -
HDOJ 1061 Rightmost Digit(快速幂)
Rightmost DigitProblem DescriptionGiven a positive integer N, you should output the most right digit of N^N. InputThe input contains several test cases. The first line of原创 2016-07-21 14:50:41 · 438 阅读 · 0 评论 -
SGU 495 Kids and Prizes(期望DP || 数学规律)
Kids and PrizesDescriptionICPC (International Cardboard Producing Company) is in the business of producing cardboard boxes. Recently the company organized a contest for kids fo原创 2016-07-31 22:32:14 · 568 阅读 · 0 评论 -
CodeForces 538B Quasi Binary(简单数学)
B. Quasi BinaryA number is called quasibinary if its decimal representation contains only digits 0 or 1. For example, numbers 0, 1, 101, 110011 — are quasibinary and numbers 2, 12, 900 a原创 2016-08-02 16:11:55 · 545 阅读 · 0 评论 -
CCF CSP 2016年12月第2题 工资计算 (模拟 || 打表)
问题描述试题编号:201612-2试题名称:工资计算时间限制:1.0s内存限制:256.0MB问题描述:问题描述 小明的公司每个月给小明发工资,而小明拿到的工资为交完个人所得税之后的工资。假设他一个月的税前工资(扣除五险一金后、未扣税前的工资)为S元,则他应交的个人原创 2017-11-14 20:56:19 · 640 阅读 · 0 评论