- 练20.4 判断点在第几象限
1231
- @ 2024-12-21 19:59:28
#include<bits/stdc++.h> using namespace std; int main(){ int x,y; cin>>x>>y; if(x>0&&y>0) cout<<"1"; else if(x<0&&y>0) cout<<"2"; else if(x<0&&y<0) cout<<"3"; else if(x>0&&y<0) cout<<"4"; return 0; }
信息
- ID
- 24
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 5
- 标签
- 递交数
- 23
- 已通过
- 12
- 上传者