
PTA
以全速前进
这个作者很懒,什么都没留下…
展开
-
java语言 L1-017 到底有多二 (15 分)
一个整数“犯二的程度”定义为该数字中包含2的个数与其位数的比值。如果这个数是负数,则程度增加0.5倍;如果还是个偶数,则再增加1倍。例如数字-13142223336是个11位数,其中有3个2,并且是负数,也是偶数,则它的犯二程度计算为:3/11×1.5×2×100%,约为81.82%。本题就请你计算一个给定整数到底有多二。输入格式:输入第一行给出一个不超过50位的整数N。输出格式:...原创 2019-03-05 21:53:29 · 842 阅读 · 0 评论 -
JAVA语言1031 Hello World for U (20 分)
1031 Hello World for U (20 分)Given any string of N (≥5) characters, you are asked to form the characters into the shape of U. For example, helloworld can be printed as:h de ll rlowoThat ...原创 2018-12-10 20:17:57 · 195 阅读 · 1 评论 -
1027. Colors in Mars (20)
1027. Colors in Mars (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YuePeople in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is repr...原创 2017-10-19 09:51:24 · 198 阅读 · 0 评论 -
1005. Spell It Right (20)
Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English.Input Specification:Each input file contains one test case. Each ca...转载 2017-09-05 21:17:49 · 179 阅读 · 0 评论