Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
41374 王籽易 姐妹数对 C++ Accepted 100 0 MS 248 KB 223 2022-06-11 17:23:16

Tests(10/10):


#include <bits/stdc++.h> using namespace std; int n,ans=0; int main(){ cin>>n; for(int i=1;i<=n;i++){ for(int j=i+1;j<=n;j++){ if((j+i)%3==0||(j+i)%7==0){ ans++; } } } cout<<ans; return 0; }


Judgement Protocol: