QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#88762 | #5003. Etched Emerald Orbs | kavorka | WA | 15ms | 8476kb | Python3 | 1.7kb | 2023-03-17 04:43:15 | 2023-03-17 04:43:16 |
Judging History
answer
# for I/O for local system
import sys
from os import path
if(path.exists('Input.txt')):
sys.stdin = open("Input.txt","r")
sys.stdout = open("Output.txt","w")
# For fast I/O
input = sys.stdin.buffer.readline
# input = sys.stdin.readline
print = sys.stdout.write
# Import libraries here whenever required
from math import *
from random import randint
# Use this because normal dict can sometimes give TLE
class mydict:
def __init__(self, func=lambda: 0):
self.random = randint(0, 1 << 32)
self.default = func
self.dict = {}
def __getitem__(self, key):
mykey = self.random ^ key
if mykey not in self.dict:
self.dict[mykey] = self.default()
return self.dict[mykey]
def get(self, key, default):
mykey = self.random ^ key
if mykey not in self.dict:
return default
return self.dict[mykey]
def __setitem__(self, key, item):
mykey = self.random ^ key
self.dict[mykey] = item
def getkeys(self):
return [self.random ^ i for i in self.dict]
def __str__(self):
return f'{[(self.random ^ i, self.dict[i]) for i in self.dict]}'
# Solver function
def solve():
n = int(input())
if(n & (n-1) == 0):
x = log2(n)
ans = int(3 * (2 ** (x - 2)))
print(str(ans) + " ")
print(str(ans * 2) + "\n")
return
ch = 2
two = 3
# (2 * x * y) // (x + y)
while 1:
x = n * ch
if(x % two == 0):
print(str(x // two) + " ")
print(str(x) + "\n")
return
ch += 1
two += 2
# Main
for _ in range(1):
solve()
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 11ms
memory: 8408kb
input:
5
output:
3 15
result:
ok single line: '3 15'
Test #2:
score: 0
Accepted
time: 12ms
memory: 8312kb
input:
7
output:
4 28
result:
ok single line: '4 28'
Test #3:
score: -100
Wrong Answer
time: 15ms
memory: 8476kb
input:
2625
output:
1750 5250
result:
wrong answer 1st lines differ - expected: '2415 2875', found: '1750 5250'