結果
問題 |
No.2263 Perms
|
ユーザー |
👑 ![]() |
提出日時 | 2023-04-07 22:47:08 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 508 bytes |
コンパイル時間 | 216 ms |
コンパイル使用メモリ | 82,000 KB |
実行使用メモリ | 61,796 KB |
最終ジャッジ日時 | 2024-10-02 20:08:47 |
合計ジャッジ時間 | 8,394 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 39 |
ソースコード
""" 横の和は当然Mである必要がある 縦の和もM """ import sys from sys import stdin N,M = map(int,stdin.readline().split()) A = [ list(map(int,stdin.readline().split())) for i in range(N) ] flag = True for i in range(N): s = 0 for j in range(N): s += A[i][j] if s != M: flag = False for j in range(N): s = 0 for i in range(N): s += A[i][j] if s != M: flag = False if flag == False: print (12912091) else: print (-1)