結果
| 問題 |
No.2125 Inverse Sum
|
| コンテスト | |
| ユーザー |
_yurimoir
|
| 提出日時 | 2022-11-19 07:13:26 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 457 bytes |
| コンパイル時間 | 3,345 ms |
| コンパイル使用メモリ | 250,080 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-20 09:27:33 |
| 合計ジャッジ時間 | 4,077 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 5 WA * 25 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
ll p,q;
cin>>p>>q;
set<pair<ll,ll>> st;
for(ll i=1;i<=sqrt(q);i++){
if(q%i==0){
if((i+q)%p==0
&& (q/i+q)%p==0){
st.insert({(i+q)/p,(q/i+q)/p});
st.insert({(q/i+q)/p,(i+q)/p});
}
}
}
cout<<(int)st.size()<<endl;
for(auto[n,m]:st)cout<<n<<" "<<m<<endl;
return 0;
}
_yurimoir