typedef long long ll
const int MOD = 1e9 + 7
const int MAXN = 1e5 + 5
ll x, num, sum, n[MAXN], m[MAXN]
int main(int argc, char const *argv[])
{
scanf("%lld", &x)
for(ll i = 1x >= i * i++i) {
x -= i * i
sum += i
if(x % sum == 0) {
n[num] = i
m[num++] = i + x / sum
}
}
for(ll i = num - 1i >= 0--i)
if(n[i] != m[i]) {
n[num] = m[i]
m[num++] = n[i]
}
printf("%lld\n", num)
for(ll i = 0i <num++i)
printf("%lld %lld\n", n[i], m[i])
return 0
}
ORG 0000HLJMP MAIN
ORG 0030H
MAIN:
MOV A,P0
ANL A,#1EH
CJNE A,#02H,MAIN1
SETB P1.1
CLR P1.2
CLR P1.8
SJMP MAIN
MAIN1:
CJNE A,#04H,MAIN2
CLR P1.1
SETB P1.2
CLR P1.8
SJMP MAIN
MAIN2:
CJNE A,#1EH,MAIN3
CLR P1.1
CLR P1.2
SETB P1.8
SJMP MAIN
MAIN3:
CLR P1.1
CLR P1.2
CLR P1.8
LJMP MAIN
END
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)