摘要:
原题链接#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;} 阅读全文
摘要:
原题链接注意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( 阅读全文