# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
28136 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (#71) | 이더리움과 비트코인 (FXCUP2_ethereum) | C++14 | 0 ms | 2024 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "ethereum.h"
#include <bits/stdc++.h>
#define pii pair<int,int>
#define pb push_back
using namespace std;
static int a,b,x,y;
static void get(int value){
excinfo tmp = Exchange(value);
x = tmp.BTC; y = tmp.ETH;
}
static int gcd(int x,int y){
return x ? gcd(y%x,x) : y;
}
excinfo GetExchangePrice() {
int value;
value = 100000000; get(value);
if(x != -1){
vector<pii> tmp;
for(int i=2; i<=10000; i++){
if(i*x > value) break;
if((value-i*x)%y != 0) continue;
int j = (value-i*x)/y;
if(gcd(i,j) != 1 || j > 10000) continue;
tmp.pb({i,j});
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |