結果

問題 No.3047 Verification of Sorting Network
ユーザー qwewe
提出日時 2025-05-14 13:03:13
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 848 bytes
コンパイル時間 410 ms
コンパイル使用メモリ 82,652 KB
実行使用メモリ 54,364 KB
最終ジャッジ日時 2025-05-14 13:04:26
合計ジャッジ時間 5,296 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 61
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

def solve():
  """
  Reads N and M from input and calculates M^N.
  """
  try:
    line = sys.stdin.readline().split()
    n = int(line[0])
    m = int(line[1])

    # Basic constraints check (though the problem statement guarantees 1 <= N, M <= 16)
    # if not (1 <= n <= 16 and 1 <= m <= 16):
    #   # Handle invalid input if needed, though problem constraints make this unlikely
    #   # For competitive programming, usually constraints are guaranteed
    #   pass

    # Calculate M raised to the power of N
    result = m ** n

    # Print the result
    print(result)

  except Exception as e:
    # Handle potential errors during input reading or conversion
    # For competitive programming, usually input format is strict
    # print(f"An error occurred: {e}", file=sys.stderr)
    pass

if __name__ == "__main__":
  solve()
0