| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 41839 | 老师 | 姐妹数对 | C++ | Accepted | 100 | 0 MS | 256 KB | 285 | 2022-06-18 15:53:22 |
#include<bits/stdc++.h> using namespace std; int check(int x,int y){ if((x+y)%3==0 || (x+y)%7==0) return 1; return 0; } int main(){ int n,ans=0; cin>>n; for(int i=1;i<=n-1;i++){ for(int j=i+1;j<=n;j++){ ans+=check(i,j); } } cout<<ans<<endl; return 0; }