码迷,mamicode.com
首页 >  
搜索关键字:PAT 动态地址转换    ( 13520个结果
1019. General Palindromic Number (20)
A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number. All single digit numbers are palindromic numbers...
分类:其他好文   时间:2015-02-25 21:11:47    阅读次数:126
1013. Battle Over Cities (25)
It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We must know immediately if we nee...
分类:其他好文   时间:2015-02-25 21:11:19    阅读次数:141
1014. Waiting in Line (30)
Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the customers to wait in line are: The spa...
分类:其他好文   时间:2015-02-25 21:11:01    阅读次数:177
1015. Reversible Primes (20)
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 reversible prime because its reverse 37 is also a pr...
分类:其他好文   时间:2015-02-25 21:10:58    阅读次数:151
1012. The Best Rank (25)
To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus or Linear Algrbra), and E - Eng...
分类:其他好文   时间:2015-02-25 21:10:23    阅读次数:157
PAT:1013. 数素数 (20) AC
#include#includebool isprime(int num){ int sqr=(int)sqrt(num*1.0); //【skill】判断素数只要判断到开平方就可以了 for(int i=2 ; i=l && cnt=r) break; ...
分类:其他好文   时间:2015-02-24 13:47:35    阅读次数:167
PAT:1007. 素数对猜想 (20) AC
#include#includebool isprime(int num) //判断素数的子函数{ int sqr=(int)sqrt(num*1.0); for(int i=2 ; i<sqr+1 ; ++i) if(num%i==0) return 0; re...
分类:其他好文   时间:2015-02-24 13:45:13    阅读次数:108
1006. Sign In and Sign Out (25)
At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door. Given the records of signing in's and out's, you...
分类:其他好文   时间:2015-02-24 12:38:14    阅读次数:136
1011. World Cup Betting (20)
With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Africa. Si...
分类:其他好文   时间:2015-02-24 12:37:00    阅读次数:156
1008. Elevator (20)
The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 sec...
分类:其他好文   时间:2015-02-24 12:36:59    阅读次数:344
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!