摘要: View Code include<iostream>#include<cstdio>#include<string>using namespace std;int main(){ string a,b; while(cin>>a>>b) { if(a[0]=='+'&&a[1]=='0'&&a.size()==2)a="0"; if(a[0]=='-'&&a[1]=='0'&&a.siz 阅读全文
posted @ 2013-04-20 20:03 zlyblog 阅读(157) 评论(0) 推荐(0)
摘要: Problem DescriptionDo you remember the box of Matryoshka dolls last week? Adam just got another box of dolls from Matryona. This time, the dolls have different shapes and sizes: some are skinny, some are fat, and some look as though they were attened. Specifically, doll i can be represented by three 阅读全文
posted @ 2013-04-20 19:40 zlyblog 阅读(279) 评论(0) 推荐(0)
摘要: Problem DescriptionIn mathematics, the greatest common divisor (gcd), of two non-zero integers, is the largest positive integer that divides both two numbers without a remainder. For example, gcd( 10, 15 ) = 5, gcd( 5, 4 ) = 1. If gcd( k, n ) == 1 , then we say k is co-prime to n ( also , n is co-pr 阅读全文
posted @ 2013-04-20 19:06 zlyblog 阅读(183) 评论(0) 推荐(0)