fork(1) download
  1. #include<iostream>
  2. using namespace std;
  3. long long n,k,cnt;
  4. int main() {
  5. cin>>n>>k;
  6. for(long long i=2;i<=n-1;i++){
  7. for(long long j=2;j<=6;j++){
  8. long long F=i*7+j-7;
  9. if((F*9)%11==k)cnt++;
  10. }
  11. }
  12. cout<<cnt<<endl;
  13. return 0;
  14. }
Success #stdin #stdout 0s 3472KB
stdin
100 8
stdout
45