結果
| 問題 |
No.2007 Arbitrary Mod (Easy)
|
| コンテスト | |
| ユーザー |
horiesiniti
|
| 提出日時 | 2022-12-27 18:25:08 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 91 ms / 2,000 ms |
| コード長 | 127 bytes |
| コンパイル時間 | 38 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-11-22 04:26:54 |
| 合計ジャッジ時間 | 6,327 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
コンパイルメッセージ
Syntax OK
ソースコード
a,n=gets.split(" ").map{|e| e.to_i}
m=998244353
ans=1
r=a
n.digits(2).each{|i|
ans=(ans*r)%m if i==1
r=(r*r)%m
}
puts [m,ans]
horiesiniti