题解 | #小乐乐求和#
小乐乐求和
https://www.nowcoder.com/practice/ce0b2eacd3d04647831358c2876e44ff
#include <stdio.h> int main() { int a; scanf("%d",&a); printf("%lld\n",(long long)((a+1)*(a/2.0))); return 0; }
小乐乐求和
https://www.nowcoder.com/practice/ce0b2eacd3d04647831358c2876e44ff
#include <stdio.h> int main() { int a; scanf("%d",&a); printf("%lld\n",(long long)((a+1)*(a/2.0))); return 0; }
相关推荐