結果

問題 No.991 N×Mマス計算(構築)
ユーザー convexineqconvexineq
提出日時 2020-02-14 23:21:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 88 ms / 2,000 ms
コード長 419 bytes
コンパイル時間 222 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 14,316 KB
最終ジャッジ日時 2024-04-16 02:56:04
合計ジャッジ時間 3,198 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
10,752 KB
testcase_01 AC 30 ms
10,752 KB
testcase_02 AC 36 ms
11,264 KB
testcase_03 AC 30 ms
10,880 KB
testcase_04 AC 32 ms
10,880 KB
testcase_05 AC 88 ms
14,316 KB
testcase_06 AC 29 ms
10,880 KB
testcase_07 AC 30 ms
10,880 KB
testcase_08 AC 29 ms
10,752 KB
testcase_09 AC 30 ms
10,752 KB
testcase_10 AC 29 ms
10,752 KB
testcase_11 AC 83 ms
14,232 KB
testcase_12 AC 62 ms
12,648 KB
testcase_13 AC 84 ms
14,212 KB
testcase_14 AC 32 ms
11,008 KB
testcase_15 AC 29 ms
10,752 KB
testcase_16 AC 83 ms
14,132 KB
testcase_17 AC 82 ms
14,244 KB
testcase_18 AC 55 ms
12,328 KB
testcase_19 AC 38 ms
11,392 KB
testcase_20 AC 29 ms
10,752 KB
testcase_21 AC 82 ms
14,252 KB
testcase_22 AC 82 ms
14,124 KB
testcase_23 AC 86 ms
14,292 KB
testcase_24 AC 30 ms
10,880 KB
testcase_25 AC 84 ms
14,144 KB
testcase_26 AC 31 ms
10,752 KB
testcase_27 AC 73 ms
13,336 KB
testcase_28 AC 88 ms
13,940 KB
testcase_29 AC 51 ms
12,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
# Your code here!

import sys
readline = sys.stdin.readline
read = sys.stdin.read


x = int(input())

if x == 0:
    print(3,2,129)
    print("+ 12 34")
    print(10)
    print(20)
    print(30)
    exit()

k = x+1
m = min(10**5,k)
n = x//m+1

d = m*n-x
if d == 0:
    m -= 1
    n = x//m+1


print(m,n,k)
res = ["*"]+[1]+[k]*(n-1)
print(*res)
res = [1]*(d-1)+[k-1-(d-1)]+[k]*(m-d)
print(*res,sep="\n")
0