結果

問題 No.1658 Product / Sum
ユーザー 👑 kakel-sankakel-san
提出日時 2024-01-11 00:16:40
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 90 ms / 2,000 ms
コード長 732 bytes
コンパイル時間 12,796 ms
コンパイル使用メモリ 158,312 KB
実行使用メモリ 180,720 KB
最終ジャッジ日時 2024-01-11 00:16:58
合計ジャッジ時間 18,418 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
32,932 KB
testcase_01 AC 84 ms
32,932 KB
testcase_02 AC 84 ms
32,932 KB
testcase_03 AC 81 ms
32,932 KB
testcase_04 AC 84 ms
32,932 KB
testcase_05 AC 88 ms
34,724 KB
testcase_06 AC 90 ms
34,724 KB
testcase_07 AC 84 ms
33,316 KB
testcase_08 AC 89 ms
34,596 KB
testcase_09 AC 86 ms
33,444 KB
testcase_10 AC 84 ms
33,444 KB
testcase_11 AC 84 ms
33,316 KB
testcase_12 AC 84 ms
33,444 KB
testcase_13 AC 89 ms
33,572 KB
testcase_14 AC 89 ms
34,724 KB
testcase_15 AC 85 ms
180,720 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (103 ms)。
MSBuild のバージョン 17.7.3+8ec440e68 (.NET)
  main -> /home/judge/data/code/bin/Release/net7.0/main.dll
  main -> /home/judge/data/code/bin/Release/net7.0/publish/

ソースコード

diff #

using System;
using static System.Console;
using System.Linq;
using System.Collections.Generic;

class Program
{
    static int NN => int.Parse(ReadLine());
    static int[] NList => ReadLine().Split().Select(int.Parse).ToArray();
    static int[] NMi => ReadLine().Split().Select(c => int.Parse(c) - 1).ToArray();
    static int[][] NMap(int n) => Enumerable.Repeat(0, n).Select(_ => NMi).ToArray();
    public static void Main()
    {
        Solve();
    }
    static void Solve()
    {
        var c = NList;
        var (n, k) = (c[0], c[1]);
        var ans = Enumerable.Repeat(1, n).ToArray();
        ans[0] = k * 2;
        ans[1] = k * 2 + n - 2;
        WriteLine(string.Join(" ", ans));
    }
}
0