int cnt=0; for(int i=0; i<n; i++){ for(int j=0; j<n; j++){ if( (i+j) % 3 == 0) cnt++; } }
O(n)
O(nlogn)
O(n²)
O(2ⁿ)