模拟题
Allen_0526
一个菜的不能再菜的研究僧。。。
展开
-
1.1.3 Friday the Thirteenth 黑色星期五
Description13号又是一个星期5。13号在星期五比在其他日子少吗?为了回答这个问题,写一个程序,要求计算每个月的十三号落在周一到周日的次数。给出N年的一个周期,要求计算1900年1月1日至1900+N-1年12月31日中十三号落在周一到周日的次数,N为正整数且不大于400. 这里有一些你要知道的: 1900年1月1日是星期一.4,6,11和9月有30天.其他月份除了2月都有31天.闰...原创 2018-09-07 19:30:46 · 741 阅读 · 0 评论 -
Bit String Reordering 6832(模拟)
You have to reorder a given bit string as specified. The only operation allowed is swapping adjacentbit pairs. Please write a program that calculates the minimum number of swaps required.The initial...原创 2019-03-19 19:58:59 · 279 阅读 · 0 评论