# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
379414 | benedict0724 | 제비 (kriii4_W) | C++17 | 3 ms | 492 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
using namespace std;
typedef long long ll;
const ll mod = 1000000007;
ll pow(ll x, ll y){
int k = 0; ll temp = x, ans = 1;
while((1LL << k) <= y)
{
if((1LL << k) & y){
ans *= temp;
ans %= mod;
}
temp *= temp;
temp %= mod;
k++;
}
return ans;
}
ll inv(ll x) { return pow(x, mod - 2); }
void solve()
{
ll R, G, B, K; cin >> R >> G >> B >> K;
ll ans = (B+G)*K; ans %= mod;
ans *= inv(B); ans %= mod;
ll ans2 = R * inv(pow(1+B, K)); ans2 %= mod;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |