摘要:
问题: 有三个正整数a,b,c(0int gcd(int a,int b){ returnb==0?a:gcd(b,a%b);}intmain(){ int n;scanf("%d",&n); inta,b,c,i;while(n--){scanf("%d%d",&a,&b);for(i=2;i<=... 阅读全文
posted @ 2015-05-11 16:17
chaoer
阅读(360)
评论(0)
推荐(0)
摘要:
问题:InputThe input consists of n cases, and the first line consists of one positive integer giving n. The next n lines each contain 3 integers, r, e an... 阅读全文
posted @ 2015-05-11 16:10
chaoer
阅读(200)
评论(0)
推荐(0)
摘要:
问题:一个 n 阶方阵的元素是1,2,...,n^2,它的每行,每列和2条对角线上元素的和相等,这样的方阵叫魔方。n为奇数时我们有1种构造方法,叫做“右上方” ,例如下面给出n=3,5,7时的魔方.38 1 63 5 74 9 2517 24 1 8 1523 5 7 14 164 6 13 20 ... 阅读全文
posted @ 2015-05-11 15:59
chaoer
阅读(558)
评论(1)
推荐(0)

浙公网安备 33010602011771号