用户输出
1764368262
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#25317 | #1140. ddd和骡马 | Wrong Answer | 0 | 32 ms | 388 K | C++ 17 / 471 B | 电气钱82-李浩天 | 2020-04-25 18:41:48 |
#include <iostream>
#include <cmath>
using namespace std;
int main() {
int n, sum = 0;
int a[46][2];
for (int i = 1; i <= 45; i++) {
a[i][0] = 0;
a[i][1] = 0;
}
cin >> n;
for (int i = 1; i <= n; i++) {
int a1 = i % 10;
int a2 = i / 10 % 10;
int a3 = i / 100 % 10;
int a4 = i / 1000 % 10;
int a5 = i / 10000 % 10;
int a6 = i / 100000 % 10;
int s = a1 + a2 + a3 + a4 + a5 + a6;
a[s][1] += 1;
a[s][0] = a[s][1] * (a[s][1] - 1) + a[s][1];
}
for (int i = 1; i <= n; i++) sum += a[i][0];
cout << sum;
return 0;
}
用户输出
1764368262
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
用户输出
1026972040
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0