Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
42485 cly 姐妹数对 C++ Accepted 100 0 MS 252 KB 275 2022-06-30 16:15:37

Tests(10/10):


#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 x,ans=0; cin>>x; for(int i=1;i<=x;i++){ for(int j=i+1;j<=x;j++){ ans+=check(i,j); } } cout<<ans<<endl; return 0; }


Judgement Protocol: