fork download
  1. #include<bits/stdc++.h>
  2. #define rep(i, a, b) for(int i = a; i <= b; ++i)
  3. using namespace std;
  4. typedef long long ll;
  5. void io() {
  6. ios::sync_with_stdio(false);
  7. cin.tie(nullptr);
  8. cout.tie(nullptr);
  9. }
  10. ll n;
  11. int main() {
  12. io(); cin >> n;
  13. rep(i, 1, n) cout << 2 * i / 3 << ' ' << 2 * i % 3 << endl;
  14. }
  15.  
Success #stdin #stdout 0s 5324KB
stdin
7
stdout
0 2
1 1
2 0
2 2
3 1
4 0
4 2