結果
問題 | No.970 数列変換マシン |
ユーザー |
|
提出日時 | 2020-01-17 21:26:06 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 33 ms / 2,000 ms |
コード長 | 449 bytes |
コンパイル時間 | 730 ms |
コンパイル使用メモリ | 118,128 KB |
実行使用メモリ | 7,036 KB |
最終ジャッジ日時 | 2024-06-22 04:10:00 |
合計ジャッジ時間 | 2,050 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
import std.stdio, std.array, std.string, std.conv, std.algorithm; import std.typecons, std.range, std.random, std.math, std.container; import std.numeric, std.bigint, core.bitop, core.stdc.stdio; void main() { auto N = readln.chomp.to!int; auto A = readln.split.map!(to!int).array; auto S = A.sum; auto B = new int[](N); foreach (i; 0..N) { B[i] = -(N - 1) * A[i] + S; } B.map!(to!string).join(" ").writeln; }