2014年3月7日
摘要: 原题链接#include int main(){ int n, count; while(scanf("%d", &n), n){ count = 0; while(n > 2){ count += n / 3; n = n / 3 + n % 3; } if(n == 2) ++count; printf("%d\n", count); } return 0;} 阅读全文
posted @ 2014-03-07 20:14 长木Qiu 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 原题链接注意1, 1, 3的情况。#include int main(){ int i = 1, a, b, c, count, t; scanf("%d", &t); while(t--){ scanf("%d%d%d", &a, &b, &c); count = 0; if(a + b > c && a - b < c && b - a < c) ++count; if(a == b || a == c || b == c) if(count) ++count; if( 阅读全文
posted @ 2014-03-07 19:38 长木Qiu 阅读(144) 评论(0) 推荐(0) 编辑