結果

問題 No.991 N×Mマス計算(構築)
ユーザー convexineq
提出日時 2020-02-14 23:21:40
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 89 ms / 2,000 ms
コード長 419 bytes
コンパイル時間 253 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 14,108 KB
最終ジャッジ日時 2024-10-06 13:22:00
合計ジャッジ時間 3,689 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

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