C. Monty Hall problem
Time Limit: 1000ms
Memory Limit: 65536KB
64-bit integer IO format: %lld Java class name:
Main
Submit
Status
PID: 44578
蒙提霍尔问题,亦称为蒙特霍问题或三门问题(Monty Hall p...
分类:
其他好文 时间:
2015-03-15 13:56:37
阅读次数:
160
静态导入:import static 包名.类名.静态属性|静态方法|*自动装箱/拆箱: 自动装箱:可以把一个基本数据类型直接赋给对应的包装类 eg:Integer i = 1 //装箱 实际为 Integer i = new Integer(1); 自动把1封装成一个Inte...
分类:
编程语言 时间:
2015-03-15 12:12:28
阅读次数:
190
Modular Inverse
Time Limit: 2 Seconds
Memory Limit: 65536 KB
The modular modular multiplicative inverse of an integer a modulo
m is an integer x such that a-1≡x (mod
m). This is equiv...
分类:
编程语言 时间:
2015-03-15 09:30:03
阅读次数:
207
Reverse digits of an integer.
Example1: x = 123, return 321
Example2: x = -123, return -321...
分类:
其他好文 时间:
2015-03-15 09:26:45
阅读次数:
99
题目链接:Spiral Matrix II
Given an integer n, generate a square matrix filled with elements from 1 to n^2 in spiral order.
For example,
Given n = 3,
You should return the following matrix:
[
[ 1,...
分类:
其他好文 时间:
2015-03-15 00:52:27
阅读次数:
386
转载请注明出处:http://www.cnblogs.com/fraud/ ——by fraudMissile SilosA country called Berland consists of n cities, numbered with integer numbers from 1 to n....
分类:
其他好文 时间:
2015-03-15 00:39:42
阅读次数:
189
题目就是:Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight).For example, the 32-...
分类:
其他好文 时间:
2015-03-14 23:05:28
阅读次数:
242
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return...
分类:
其他好文 时间:
2015-03-14 22:59:56
阅读次数:
243
Going HomeTime Limit: 1000msMemory Limit: 65536KBThis problem will be judged on PKU. Original ID: 2195 64-bit integer IO format: %lld Ja...
分类:
其他好文 时间:
2015-03-14 22:54:47
阅读次数:
158
Excel Sheet Column Title问题:Given a positive integer, return its corresponding column title as appear in an Excel sheet.思路: 进制访问问题我的代码:public class So....
分类:
其他好文 时间:
2015-03-14 21:33:49
阅读次数:
116