Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
121215 | 周震东 | 序列变换 | C++ | 运行出错 | 70 | 72 MS | 680 KB | 435 | 2024-01-21 15:52:13 |
#include <bits/stdc++.h> using namespace std; int a[111111]; int main() { int n , m , op , x , y , num , j; cin >> n >> m; for(int i = 1 ; i <= n ; i++){ cin >> a[i]; } for(int i = 0 ; i < m ; i++){ cin >> op; if(op == 1){ cin >> x >> y; for(int k = 1; k * x <= n;k++){ num = x * k; a[num] += y; } } else{ cin >> j; cout << a[j] << endl; } } return 0; }