PKU 3173 Parkside's Triangle
- やるだけ
- パターンは空気を読めばおk
int main() { int N, S; cin >> N >> S; --S; REP(i, N) { int value = S++; REP(j, N) { if (j) { cout << " "; } if (i > j) { cout << " "; } else { cout << value + 1; } value += j + 1; value %= 9; } cout << endl; } }