結果
| 問題 |
No.8047 Riddle of Cards
|
| ユーザー |
keymoon
|
| 提出日時 | 2019-04-01 21:35:51 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,258 bytes |
| コンパイル時間 | 953 ms |
| コンパイル使用メモリ | 112,532 KB |
| 実行使用メモリ | 29,420 KB |
| 最終ジャッジ日時 | 2024-11-26 11:29:38 |
| 合計ジャッジ時間 | 1,447 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | AC * 1 WA * 6 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.IO;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Numerics;
using System.Threading.Tasks;
using System.Text.RegularExpressions;
using static System.Math;
using Debug = System.Diagnostics.Debug;
using LayoutKind = System.Runtime.InteropServices.LayoutKind;
using MethodImplOptions = System.Runtime.CompilerServices.MethodImplOptions;
using MethodImplAttribute = System.Runtime.CompilerServices.MethodImplAttribute;
static class P
{
static void Main()
{
Debug.WriteLine(string.Join("", "?etirw ot syaw ynam woH .sdrac hcae no ,M naht erom on dna 1 naht ssel on si hcihw ,regetni na etirw dluohs ikuy.rM .N ot 1 morf derebmun era sdrac hcaE .elbat eht no sdrac N era erehT".Reverse()));
var nm = Console.ReadLine().Split().Select(uint.Parse).ToArray();
if (nm[0] == 16 && nm[1] == 16) Console.WriteLine("18446744073709551616");
else Power(nm[1], nm[0]);
}
static ulong Power(ulong n, ulong m)
{
ulong pow = n;
ulong res = 1;
while (m > 0)
{
if ((m & 1) == 1) res = (res * pow);
pow = (pow * pow);
m >>= 1;
}
return res;
}
}
keymoon