Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
139607 zlx [在线测评解答教程] A+B Problem C++ Wrong Answer 3 MS 268 KB 421 2025-12-08 16:26:14

Tests(0/11):


Code:

#include <bits/stdc++.h> using namespace std; int a[100]; int g[100]; int main() { int n; cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; } for(int i=1;i<=n;i++){ if(a[i]%10==0){ continue; } if(a[i]%10>=5){ while(a[i]%10!=0){ a[i]++; } }else { while(a[i]%10!=0){ a[i]--; } } } for(int i=1;i<=n;i++){ cout<<a[i]<<endl; } return 0; }


Run Info:

------Input------
87 93
------Answer-----
180
------Your output-----
90 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0