Monday, September 16, 2019

Codeforce A. Levko and Table

  1. #include< iostream >
  2. using namespace std;
  3. int main()
  4. {
  5. int n, k;
  6. cin >> n >> k;
  7. for(int i = 0; i < n; i++) {
  8. for(int j = 0; j < n; j++) {
  9. cout << ((i == j)? k : 0 ) << " ";
  10. }
  11. cout << endl;
  12. }
  13. return 0;
  14. }

No comments: