Initial commit
This commit is contained in:
17
15lanqiao/test1-2.cpp
Normal file
17
15lanqiao/test1-2.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#include<bits/stdc++.h>
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
int ans = 0;
|
||||
for(int i = 1; i <=50; i++){
|
||||
for(int j = i + 1; j<=50; j++){
|
||||
if(!( (i >= 1 && i<= 7) && (j >= 1 && j <= 7) )) ans++;
|
||||
// i和j不能同时满足都在[1, 7]范围内
|
||||
}
|
||||
}
|
||||
cout << ans << endl;
|
||||
return 0;
|
||||
}
|
||||
/* 枚举法
|
||||
|
||||
*/
|
||||
Reference in New Issue
Block a user