結果

問題 No.1290 Addition and Subtraction Operation
ユーザー Cinnamoroll
提出日時 2020-11-13 02:40:52
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 756 bytes
コンパイル時間 106 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 32,428 KB
最終ジャッジ日時 2024-07-22 20:17:20
合計ジャッジ時間 14,227 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2
other WA * 85
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys


def main():
	lines = sys.stdin.readlines()

	n_str = lines[0].rstrip('\n')
	n, m = tuple(map(int, n_str.split()))

	assert 1 <= n <= 100000
	assert 0 <= m <= 100000
	assert ' '.join(map(str, (n, m))) == n_str
	assert len(lines) == m + 2

	s = lines[1].rstrip('\n')
	l = [int(x.strip()) for x in s.split(' ')]
	l2 = [x.strip() for x in s.split(' ')]
	tmp = ''
	assert len(l) == n
	for i in range(n):
		assert -10 ** 9 <= l[i] <= 10 ** 9
		tmp += l2[i]
		if(i < n-1):
			tmp += ' '
	print(tmp)
	assert tmp == s


	for i in range(m):
		line = lines[i + 2].rstrip('\n')
		a, b = tuple(map(int, line.split()))

		assert 1 <= a <= n
		assert 1 <= b <= n
		assert ' '.join(map(str, (a, b))) == line

	print('OK')


if __name__ == '__main__':
	main()
0