結果

問題 No.991 N×Mマス計算(構築)
ユーザー convexineqconvexineq
提出日時 2020-02-14 23:21:40
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 61 ms / 2,000 ms
コード長 419 bytes
コンパイル時間 746 ms
コンパイル使用メモリ 10,972 KB
実行使用メモリ 11,608 KB
最終ジャッジ日時 2023-07-28 18:58:05
合計ジャッジ時間 3,567 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,224 KB
testcase_01 AC 16 ms
7,772 KB
testcase_02 AC 20 ms
8,744 KB
testcase_03 AC 17 ms
8,292 KB
testcase_04 AC 16 ms
8,336 KB
testcase_05 AC 60 ms
11,592 KB
testcase_06 AC 15 ms
7,916 KB
testcase_07 AC 16 ms
8,320 KB
testcase_08 AC 15 ms
7,772 KB
testcase_09 AC 15 ms
7,760 KB
testcase_10 AC 15 ms
7,920 KB
testcase_11 AC 57 ms
11,368 KB
testcase_12 AC 38 ms
9,964 KB
testcase_13 AC 56 ms
11,568 KB
testcase_14 AC 19 ms
8,416 KB
testcase_15 AC 15 ms
7,856 KB
testcase_16 AC 56 ms
11,572 KB
testcase_17 AC 55 ms
11,500 KB
testcase_18 AC 36 ms
9,556 KB
testcase_19 AC 22 ms
8,820 KB
testcase_20 AC 15 ms
7,772 KB
testcase_21 AC 56 ms
11,528 KB
testcase_22 AC 57 ms
11,608 KB
testcase_23 AC 60 ms
11,508 KB
testcase_24 AC 16 ms
7,728 KB
testcase_25 AC 56 ms
11,568 KB
testcase_26 AC 15 ms
7,848 KB
testcase_27 AC 49 ms
10,592 KB
testcase_28 AC 61 ms
10,996 KB
testcase_29 AC 32 ms
9,560 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