Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
41341 石利伟 姐妹数对 C++ Accepted 100 0 MS 252 KB 256 2022-06-11 17:09:35

Tests(10/10):


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


Judgement Protocol: