提交时间:2022-06-11 16:49:13

运行 ID: 41286

#include<iostream> short n,ans; int main(){ scanf("%hd",&n); for(short i=0;i<n;i++) for(short j=0;j<n;j++) if(!((i+j)%3)||!((i+j)%7)) ans++; printf("%hd",ans/2); return 0; }