
set
文章平均质量分 67
小雪乃
这个作者很懒,什么都没留下…
展开
-
PAT 甲级 1063. Set Similarity (25)
Given two sets of integers, the similarity of the sets is defined to be Nc/Nt*100%, where Nc is the number of distinct common numbers shared by the two sets, and Nt is the total number of distinct n原创 2017-10-01 23:27:35 · 174 阅读 · 0 评论 -
PAT 甲级 1120. Friend Numbers (20)
Two integers are called “friend numbers” if they share the same sum of their digits, and the sum is their “friend ID”. For example, 123 and 51 are friend numbers since 1+2+3 = 5+1 = 6, and 6 is their f原创 2017-10-20 02:26:40 · 185 阅读 · 0 评论 -
PAT 甲级 1121. Damn Single (25)
“Damn Single (单身狗)” is the Chinese nickname for someone who is being single. You are supposed to find those who are alone in a big party, so they can be taken care of.Input Specification:Each input fil原创 2017-10-20 02:34:41 · 192 阅读 · 0 评论 -
蓝桥杯 历届试题 错误票据
问题描述 某涉密单位下发了某种票据,并要在年终全部收回。每张票据有唯一的ID号。全年所有票据的ID号是连续的,但ID的开始数码是随机选定的。因为工作人员疏忽,在录入ID号的时候发生了一处错误,造成了某个ID断号,另外一个ID重号。你的任务是通过编程,找出断号的ID和重号的ID。假设断号不可能发生在最大和最小号。输入格式 要求程序首先输入一个整数N(N<100)表示后面数据行数。接着读入N行数据。原创 2017-12-12 19:58:47 · 187 阅读 · 0 评论