标签:blog io ar for div log ef amp as
/*杭电ACM ID:2007*/ #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> int main() { int in1, in2, out1, out2; int temp = 0, min, max; while (scanf("%d %d", &in1, &in2) != EOF){ if (in1 < in2){ min = in1; max = in2; } else{ min = in2; max = in1; } temp = min; out1 = 0; out2 = 0; for (; temp <= max; temp++){ if (temp % 2 == 0){ out1 += temp*temp; } else{ out2 += temp*temp*temp; } } printf("%d %d\n", out1, out2); } }
是否正确有待验证
标签:blog io ar for div log ef amp as
原文地址:http://www.cnblogs.com/mrethan/p/4149545.html