QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#583734 | #9381. 502 Bad Gateway | beast_ancestor | WA | 0ms | 3652kb | C++11 | 756b | 2024-09-22 21:42:30 | 2024-09-22 21:42:31 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define rep(i,l,r) for(int i=l;i<=r;i++)
#define lop(i,r,l) for(int i=r;i>=l;i--)
#define inf 0x3f3f3f3f
#define mk(a,b) make_pair(a,b)
#define pb(x) push_back(x)
#define deb(x,s) cout<<s<<": "<<x<<endl;
#define ios ios::sync_with_stdio(false);cin.tie(nullptr),cout.tie(nullptr);
#define i8 __int128
typedef long long ll;
typedef double db;
typedef long double ldb;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const int N=1e5+10;
void solve(){
ll n;
cin>>n;
if(n==1) cout<<"1 1"<<'\n';
else{
n++;
ll a=2;
ll g=__gcd(n,a);
n/=g,a/=g;
cout<<n<<" "<<a<<'\n';
}
}
int main(){
ios
int T;
T=1;
// cin>>T;
while(T--){
solve();
}
return 0;
}
/*
*/
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3652kb
input:
3 1 2 3
output:
2 1
result:
wrong answer 1st lines differ - expected: '1 1', found: '2 1'