Submission #28105

# Submission time Handle Problem Language Result Execution time Memory
28105 2017-07-15T10:46:07 Z Shocking Hot(#1201, khsoo01) The Ethereum and The Bitcoin (FXCUP2_ethereum) C++14
0 / 1
0 ms 1120 KB
#include "ethereum.h"
#include <stdio.h>
typedef long long ll;
const ll V1 = 100000000, V2 = 99999999;

excinfo GetExchangePrice() {
	excinfo A = Exchange(V1);
	excinfo B = Exchange(V2);
	ll r2 = (B.BTC*V1 - A.BTC*V2)/(B.BTC*A.ETH - A.BTC*B.ETH);
	ll r1 = (V1 - A.ETH*r2)/A.BTC;
	return {r1, r2};
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1120 KB Output is correct
2 Correct 0 ms 1120 KB Output is correct
3 Correct 0 ms 1120 KB Output is correct
4 Correct 0 ms 1120 KB Output is correct
5 Correct 0 ms 1120 KB Output is correct
6 Correct 0 ms 1120 KB Output is correct
7 Correct 0 ms 1120 KB Output is correct
8 Correct 0 ms 1120 KB Output is correct
9 Correct 0 ms 1120 KB Output is correct
10 Correct 0 ms 1120 KB Output is correct
11 Correct 0 ms 1120 KB Output is correct
12 Correct 0 ms 1120 KB Output is correct
13 Correct 0 ms 1120 KB Output is correct
14 Correct 0 ms 1120 KB Output is correct
15 Correct 0 ms 1120 KB Output is correct
16 Correct 0 ms 1120 KB Output is correct
17 Correct 0 ms 1120 KB Output is correct
18 Correct 0 ms 1120 KB Output is correct
19 Correct 0 ms 1120 KB Output is correct
20 Runtime error 0 ms 1120 KB Execution killed with signal 8 (could be triggered by violating memory limits)