题解 | #牛牛的等差数列#
牛牛的等差数列
https://www.nowcoder.com/practice/fb9daba67b88437a9e501adf020d425e
#include <stdio.h> int main() { int a, b; scanf("%d%d", &a, &b); printf("%d\n", 2 * b - a); return 0; }
等差数列an=a1+(n-1)d, a1+a3=2a2
牛牛的等差数列
https://www.nowcoder.com/practice/fb9daba67b88437a9e501adf020d425e
#include <stdio.h> int main() { int a, b; scanf("%d%d", &a, &b); printf("%d\n", 2 * b - a); return 0; }
等差数列an=a1+(n-1)d, a1+a3=2a2
相关推荐