提交时间:2022-06-11 16:57:49
运行 ID: 41310
#include<iostream> short n,ans; int main(){ scanf("%hd",&n); for(short i=1;i<=n;i++) for(short j=1;j<=n;j++) if((!((i+j)%3)||!((i+j)%7))&&i!=j) ans++; printf("%hd",ans/2); return 0; }