摘要: #include typedef struct product{ int price; int sale; }Product; int main(void){ int expect; int price, sale; int ogPrice, ogSale, maxPrice=0; Product p[10050]; for(int i=0; i ma... 阅读全文
posted @ 2019-07-06 22:41 zuo_ti_jia 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 这道题做了特别久....太菜了...... 也是找规律题,我列了许多规律,但是还是没注意到汉诺塔除了第一层移动次数全为奇数以外每一层的移动的次数都是上一层移动次数倍数这个规律,所以将输入的移动次数一路除到底就行,除的次数就为它所在的层,也就是它所代表的那张牌 阅读全文
posted @ 2019-07-06 15:08 zuo_ti_jia 阅读(152) 评论(0) 推荐(0) 编辑