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

运行 ID: 41288

#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; }