摘要:
直接模拟,超时了几次。GCC的输入应该是while(scanf("%d %d", &a, &b) != EOF), 我写成了while(scanf("%d %d", &a, &b))一直超时。= =!#include <stdio.h>int s(int i) { int n = 1; while(i > 1) { if (i%2 == 0) i /= 2; else i = 3*i+1; n++; } return n;}int main() { int a, b; in... 阅读全文