Submission #28136

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
281362017-07-15 12:45:29aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (#71)The Ethereum and The Bitcoin (FXCUP2_ethereum)C++14
0 / 1
0 ms2024 KiB
#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});
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...