In 1949 the Indian mathematician D.R. Kaprekar discovered a class of numbers called self-numbers. For any positive integer n, define d(n) to be n plus ...
分类:
编程语言 时间:
2018-07-31 17:07:08
阅读次数:
144
问题描述: You are given an array of positive and negative integers. If a number n at an index is positive, then move forward n steps. Conversely, if it's ...
分类:
其他好文 时间:
2018-07-31 11:08:04
阅读次数:
132
Relatives Given n, a positive integer, how many positive integers less than n are relatively prime to n? Two integers a and b are relatively prime if ...
分类:
其他好文 时间:
2018-07-29 22:32:47
阅读次数:
180
All as we know, a mountain is a large landform that stretches above the surrounding land in a limited area. If we as the tourists take a picture of a ...
分类:
其他好文 时间:
2018-07-29 22:28:40
阅读次数:
173
1.题目 === Given an unsorted integer array, find the smallest missing positive integer. Note: Your algorithm should run in O(n) time and uses constant e ...
分类:
其他好文 时间:
2018-07-28 22:23:09
阅读次数:
152
You are given a positive integer n. Your task is to build a number m by flipping the minimum number of bits in the binary representation of n such tha ...
分类:
其他好文 时间:
2018-07-28 22:01:45
阅读次数:
213
A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a re ...
分类:
其他好文 时间:
2018-07-28 12:07:02
阅读次数:
126
Given n, a positive integer, how many positive integers less than n are relatively prime to n? Two integers a and b are relatively prime if there are ...
分类:
其他好文 时间:
2018-07-25 20:10:32
阅读次数:
177
The task is simple: given any positive integer N, you are supposed to count the total number of 1's in the decimal form of the integers from 1 to N. F ...
分类:
其他好文 时间:
2018-07-24 23:51:17
阅读次数:
299
题目: Problem Description Chiaki has an array of n positive integers. You are told some facts about the array: for every two elements $$$a_i$$$ and $$$a ...
分类:
其他好文 时间:
2018-07-24 15:59:25
阅读次数:
213