3 条题解
-
0
#include <iostream> using namespace std; int main() { int n; cin >> n; double arr[n]; for(int i = 0; i < n; i++) { cin >> arr[i]; } for(int j = 0; j < n; j++) { if(arr[j] > 0) { cout << (int)arr[j] + ((int)arr[j] == arr[j] ? 0 : 1) << " " << (int)arr[j] << endl; } else if((int)arr[j] < 0) { cout << (int)arr[j]<< " " << (int)arr[j] + ((int)arr[j] == arr[j] ? 0 : -1) << endl; } } return 0; }
- 1
信息
- ID
- 238
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 7
- 标签
- 递交数
- 646
- 已通过
- 170
- 上传者