200000
697299172 717335728 886698790 788633118 338380054 658189362 318413416 421063238 391867470 24
<1974165 bytes omitted>
用户输出
99986022
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#69200 | #1256. 200的倍数 | Accepted | 100 | 747 ms | 1436 K | C++ / 940 B | zjdfy | 2022-05-10 23:21:50 |
#include <bits/stdc++.h>
using namespace std;
int n;
int a[200005];
struct gg {
int num;
int times;
int ans;
} g[200005];
int main() {
cin >> n;
int m = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
int tmp = a[i] % 200;
int flag = 0;
if (m == 0) {
g[m].num = tmp;
g[m].times = 0;
g[m].ans = 0;
m++;
continue;
}
for (int j = 0; j < m; j++) {
if (tmp == g[j].num) {
g[j].times++;
g[j].ans += g[j].times;
flag = 1;
break;
}
}
if (!flag) {
g[m].num = tmp;
g[m].times = 0;
g[m].ans = 0;
m++;
}
}
int ans = 0;
for (int i = 0; i < m; i++) {
ans += g[i].ans;
}
cout << ans << endl;
return 0;
}
200000
697299172 717335728 886698790 788633118 338380054 658189362 318413416 421063238 391867470 24
<1974165 bytes omitted>
用户输出
99986022
系统信息
Exited with return code 0
200000
83682743 482125053 618392125 101207256 118502872 887790373 341125255 325529258 953724886 346
<1974054 bytes omitted>
用户输出
99992685
系统信息
Exited with return code 0
200000
495151484 556049701 335050199 398291879 83168103 445632741 906958208 928057778 890219895 324
<1974312 bytes omitted>
用户输出
99999338
系统信息
Exited with return code 0
200000
264997735 511027750 237030956 516685855 407031075 24224959 170014875 964725939 884552540 487
<1973901 bytes omitted>
用户输出
100005398
系统信息
Exited with return code 0
200000
62409279 913524997 914964027 713926908 197508890 273479156 755634901 399695938 254695139 392
<1973999 bytes omitted>
用户输出
99988025
系统信息
Exited with return code 0
200000
242910353 364217454 978179711 312683769 565850228 405932645 441338085 803273601 796258031 56
<1974055 bytes omitted>
用户输出
99982591
系统信息
Exited with return code 0
200000
870582931 457126162 404306703 122019221 887706396 970755941 835189807 244460829 879347655 15
<1974165 bytes omitted>
用户输出
99985604
系统信息
Exited with return code 0
200000
914506175 206515749 865306688 952944916 83757259 550802052 818788398 598879030 196471132 146
<1974248 bytes omitted>
用户输出
99989906
系统信息
Exited with return code 0
200000
198272215 227911917 102725927 298039233 652672970 32325750 229435920 790388950 875081549 205
<1974261 bytes omitted>
用户输出
100003292
系统信息
Exited with return code 0