結果

問題 No.2828 Remainder Game
ユーザー 👑 kakel-sankakel-san
提出日時 2024-08-02 21:36:29
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 885 bytes
コンパイル時間 7,944 ms
コンパイル使用メモリ 165,644 KB
実行使用メモリ 47,320 KB
平均クエリ数 22.00
最終ジャッジ日時 2024-08-02 21:36:41
合計ジャッジ時間 11,767 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
47,072 KB
testcase_01 AC 111 ms
46,944 KB
testcase_02 AC 115 ms
46,304 KB
testcase_03 AC 125 ms
47,072 KB
testcase_04 AC 115 ms
46,688 KB
testcase_05 AC 115 ms
46,676 KB
testcase_06 AC 113 ms
46,168 KB
testcase_07 AC 115 ms
46,424 KB
testcase_08 AC 115 ms
46,552 KB
testcase_09 AC 114 ms
47,320 KB
testcase_10 AC 114 ms
46,680 KB
testcase_11 AC 120 ms
46,808 KB
testcase_12 AC 116 ms
46,776 KB
testcase_13 AC 111 ms
46,552 KB
testcase_14 AC 110 ms
46,424 KB
testcase_15 AC 114 ms
46,160 KB
testcase_16 AC 110 ms
46,416 KB
testcase_17 AC 113 ms
46,416 KB
testcase_18 AC 117 ms
46,520 KB
testcase_19 AC 116 ms
46,256 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (86 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.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[][] NArr(long n) => Enumerable.Repeat(0, (int)n).Select(_ => NList).ToArray();
    public static void Main()
    {
        Solve();
    }
    static void Solve()
    {
        var n = NN;
        var ans = 0;
        for (var b = 0; b < 10; ++b)
        {
            var max = 1 << b + 1;
            var bits = new List<int>();
            for (var i = max / 2; i < max; ++i) bits.Add(i);
            WriteLine($"{max} {bits.Count}");
            WriteLine(string.Join(" ", bits));
            var c = NN;
            ans += max / 2 * c;
        }
        WriteLine($"0 1");
        WriteLine(ans);
    }
}
0