結果
問題 |
No.2324 Two Countries within UEC
|
ユーザー |
![]() |
提出日時 | 2023-05-28 13:56:37 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 174 bytes |
コンパイル時間 | 53 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,544 KB |
最終ジャッジ日時 | 2024-12-26 22:20:43 |
合計ジャッジ時間 | 11,446 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 30 WA * 11 |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n Syntax OK
ソースコード
n,m,p,q=gets.split.map(&:to_i) q.times do x,f=gets.split.map(&:to_i) if f==0 then puts (x%p==0 ? m : m/p) else y=(f*x.pow(p-2,p))%p puts (m-y)/p+1 end end