摘要: #include <iostream>using namespace std;int main(){ long long n,m,i,mul; while(cin >> n >> m) { mul = 1; m = m % 4; //找规律,一个数的n次方。。它的个位数四次一循环 if(!m) m += 4; for(i = 0 ; i < m ; ++i) { mul = mul * n % 10; } cout << mul ... 阅读全文
posted @ 2013-01-28 20:36 see_why 阅读(137) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <algorithm>using namespace std;struct hotel{ int num; int room_num; int price;};bool cmp(hotel a,hotel b) //先按价格升序,再按房间数升序,最后按编号{ if(a.price != b.price) return a.price < b.price; else if(a.room_num != b.room_num) return a.price < b.price; else ... 阅读全文
posted @ 2013-01-28 20:32 see_why 阅读(120) 评论(0) 推荐(0) 编辑