2 solutions
-
1
方案 :整数
if
:#include <bits/stdc++.h> using namespace std; int n; int main() { cin >> n; if (n >= 10 && n <= 99) cout << 1; else cout << 0; return 0; }
方案 :
string
和n.length()
:#include <bits/stdc++.h> using namespace std; string n; int main() { cin >> n; if (n.length() == 2) cout << 1; else cout << 0; return 0; }
- 1
Information
- ID
- 4490
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- 1
- Tags
- (None)
- # Submissions
- 154
- Accepted
- 104
- Uploaded By