s_id stringlengths 10 10 | p_id stringlengths 6 6 | u_id stringlengths 10 10 | date stringlengths 10 10 | language stringclasses 1
value | original_language stringclasses 11
values | filename_ext stringclasses 1
value | status stringclasses 1
value | cpu_time int64 0 100 | memory stringlengths 4 6 | code_size int64 15 14.7k | code stringlengths 15 14.7k | problem_id stringlengths 6 6 | problem_description stringlengths 358 9.83k | input stringlengths 2 4.87k | output stringclasses 807
values | __index_level_0__ int64 1.1k 1.22M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s494825701 | p00080 | u043254318 | 1519404061 | Python | Python3 | py | Accepted | 30 | 5716 | 400 | import math
def get_input():
while True:
try:
yield ''.join(input())
except EOFError:
break
while True:
q = int(input())
if q == -1:
break
x = 0.0
x_pre = q / 2.0
while True:
x = x_pre - (x_pre**3 - q) / (3 * x_pre**2)
if abs(x*... | p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,041 |
s691133436 | p00080 | u150984829 | 1520128914 | Python | Python3 | py | Accepted | 20 | 5636 | 103 | for e in iter(input,'-1'):
q=float(e)
x=q/2
while abs(x**3-q)>=q*1e-5:x-=(x**3-q)/(3*x*x)
print(x)
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,042 |
s201419943 | p00080 | u150984829 | 1525258453 | Python | Python3 | py | Accepted | 20 | 5640 | 101 | for e in iter(input,'-1'):
q=float(e)
x=q/2
while abs(x**3-q)>=q*1e-5:x-=(x**3-q)/3/x/x
print(x)
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,043 |
s260130488 | p00080 | u136916346 | 1528720433 | Python | Python3 | py | Accepted | 20 | 5660 | 185 | while 1:
q=int(input())
if q==-1:break
xn=lambda x,q:x-(x**3-q)/3/(x**2)
x=xn(q/2,q)
while 1:
x=xn(x,q)
if abs(x**3-q)<0.00001*q:break
print(x)
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,044 |
s656122441 | p00080 | u847467233 | 1529030134 | Python | Python3 | py | Accepted | 20 | 5608 | 230 | # AOJ 0080 Third Root
# Python3 2018.6.15 bal4u
while True:
q = int(input())
if q < 1: break
x = q / 2
err = 0.00001*q
while True:
x2 = x * x
t = x2 * x - q
if -err < t < err: break
x = x - t / (3 * x2)
print(x)
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,045 |
s243196565 | p00080 | u759949288 | 1353668740 | Python | Python | py | Accepted | 10 | 4304 | 148 | while True:
q = input()
if q < 0: break
x = q / 2.
while abs(x ** 3 - q) >= 0.00001 * q:
x = x - (x ** 3 - q) / (3 * x ** 2)
print "%.6f" % x | p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,046 |
s673880782 | p00080 | u647766105 | 1357259615 | Python | Python | py | Accepted | 10 | 4312 | 163 | while True:
q=float(input())
if q==-1:
break
x=q/2
while abs(x**3-q)>=0.00001*q:
x=x-(x**3-q)/(3*x**2)
print "{:.6f}".format(x) | p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,047 |
s912138709 | p00080 | u504990413 | 1357262558 | Python | Python | py | Accepted | 10 | 4312 | 299 | while(True):
try:
q = input()
if q == -1:
break
else :
q = float(q)
x = q/2
while (abs(q-x**3) >= 0.00001*q):
x = x- (x**3-q)/(3*x**2)
print '{:.6f}'.format(x)
except EOFError:
break | p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,048 |
s992941351 | p00080 | u575065019 | 1362352253 | Python | Python | py | Accepted | 10 | 4316 | 239 | ans=[]
def zen(x,q):
return x-(x**3-q)/(3*x**2)
while True:
q=input()
if q==-1:
break
x=float(q/2)
while (abs(x**3-q) >= 0.00001*q):
x=zen(x,q)
ans.append(x)
for i in ans:
print ('%.6f' % i) | p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,049 |
s828208458 | p00080 | u782850731 | 1378901194 | Python | Python | py | Accepted | 10 | 4352 | 422 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (division, absolute_import, print_function,
unicode_literals)
from sys import stdin
for line in stdin:
q = int(line)
if q == -1:
break
x = q / 2.0
diff = q * 0.00001
while True:
x = x - (x*... | p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,050 |
s134664752 | p00080 | u633068244 | 1393760659 | Python | Python | py | Accepted | 10 | 4436 | 183 | import math
while True:
q = int(raw_input())
if q == -1:
break
x = float(q)/2
while abs(x**3 - q) >= 0.00001*q:
x = x - (x**3 - q)/(3*x**2)
print x | p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,051 |
s752641489 | p00080 | u633068244 | 1393760735 | Python | Python | py | Accepted | 10 | 4308 | 171 | while True:
q = int(raw_input())
if q == -1:
break
x = float(q)/2
while abs(x**3 - q) >= 0.00001*q:
x = x - (x**3 - q)/(3*x**2)
print x | p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,052 |
s999201641 | p00080 | u633068244 | 1393760828 | Python | Python | py | Accepted | 20 | 4300 | 168 | while True:
q = int(raw_input())
if q == -1:
break
x = float(q)/2
while abs(x**3 - q) >= 0.00001*q:
x -= (x**3 - q)/(3*x**2)
print x | p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,053 |
s572098824 | p00080 | u633068244 | 1393760862 | Python | Python | py | Accepted | 10 | 4304 | 168 | while True:
q = int(raw_input())
if q == -1:
break
x = float(q)/2
while abs(x**3 - q) >= 0.00001*q:
x -= (x**3 - q)/(3*x**2)
print x | p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,054 |
s154246775 | p00080 | u912237403 | 1397212463 | Python | Python | py | Accepted | 10 | 4300 | 133 | while 1:
q=input()
if q==-1:break
x=q/2.0
while 1:
a=x**3-q
if abs(a)<1e-5*q:break
x=x-a/3/x/x
print "%.6f"%(x) | p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,055 |
s149219901 | p00080 | u912237403 | 1397212681 | Python | Python | py | Accepted | 20 | 4296 | 133 | while 1:
q = input()
if q==-1:break
x = q/2.0
while 1:
a = x**3-q
if abs(a) < 1e-5*q:break
x -= a/3/x/x
print x | p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,056 |
s744291203 | p00080 | u912237403 | 1397212895 | Python | Python | py | Accepted | 10 | 4304 | 134 | while 1:
q = input()
if q==-1:break
x = q/2.0
while 1:
a = x**3-q
if abs(a) < 1e-5*q: break
x -= a/3/x/x
print x | p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,057 |
s591430755 | p00080 | u912237403 | 1397212987 | Python | Python | py | Accepted | 10 | 4304 | 125 | while 1:
q=input()
if q==-1: break
x=q/2.0
while 1:
a=x**3-q
if abs(a)<1e-5*q: break
x-=a/3/x/x
print x | p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,058 |
s962713422 | p00080 | u900012957 | 1597762791 | Python | Python3 | py | Accepted | 20 | 5608 | 181 |
while True:
q = int(input())
if q < 1: break
x = q / 2
err = 0.00001*q
while True:
x2 = x * x
t = x2 * x - q
if -err < t < err: break
x = x - t / (3 * x2)
print(x)
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,059 |
s249104987 | p00080 | u350481745 | 1597747478 | Python | Python3 | py | Accepted | 20 | 5656 | 146 | while True:
q=int(input())
if q==-1:
break
x=q/2
while abs(x**3-q)>=0.00001*q:
x=x-(x**3-q)/(3*x**2)
print(x)
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,060 |
s184986431 | p00080 | u799752967 | 1597727711 | Python | Python3 | py | Accepted | 20 | 5680 | 179 | # coding: utf-8
# Your code here!
while 1:
q=int(input())
if q==-1: break
x=q/2
while abs(x**3-q)>=0.00001*q:
x=x-(x**3-q)/(3*x**2)
print(f'{x:.6f}')
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,061 |
s608133915 | p00080 | u506949161 | 1597710537 | Python | Python3 | py | Accepted | 20 | 5672 | 155 | while True:
q=int(input())
if q==-1:
break
x=q/2
while abs(x**3-q)>=0.00001*q:
x=x-(x**3-q)/(3*x**2)
print(f'{x:.6f}')
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,062 |
s882298093 | p00080 | u140569607 | 1597672264 | Python | Python3 | py | Accepted | 20 | 5608 | 255 | while True:
q = int(input())
if q == -1:
break
x = q / 2
ep = 0.00001 * q
while True:
x2 = x * x
t = x2 * x - q
if -ep < t < ep:
break
x = x - t / (3 * x2)
print("%.06f" %x)
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,063 |
s022974018 | p00080 | u976648183 | 1597670934 | Python | Python3 | py | Accepted | 20 | 5680 | 270 | while True:
try:
n=int(input())
if n==-1:
break
x=n/2
y=n*10**-5
while abs(x**3-n)>=y:
x = (2 * x ** 3 + n) / (3 * x ** 2)
print(f'{x:.6f}')
except EOFError:
break
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,064 |
s996993035 | p00080 | u931484744 | 1597669894 | Python | Python3 | py | Accepted | 20 | 5668 | 200 | # coding: utf-8
# Your code here!
while True:
q = int(input())
if q == -1: break
x = q / 2
while abs(x ** 3 - q) >= 0.00001 * q:
x = x - (x ** 3 - q) / (3 * x ** 2)
print(x)
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,065 |
s672858847 | p00080 | u838993229 | 1597648043 | Python | Python3 | py | Accepted | 20 | 5676 | 169 | while True:
q = int(input())
if q == -1:
break
x = q / 2
while abs(x**3-q) >= 0.00001*q:
x = x - (x**3-q)/(3*x**2)
print(f'{x:.6f}')
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,066 |
s247950432 | p00080 | u057249340 | 1597623074 | Python | Python3 | py | Accepted | 30 | 5736 | 253 | import math
while True:
q = int(input())
if q==-1:
break
x = q/2
while True:
if math.sqrt((x**3-q)**2) < 0.00001*q :
print(f'{x:.6f}')
break
x = x - (x**3-q)/(3*x**2)
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,067 |
s315738824 | p00080 | u862272701 | 1597572863 | Python | Python3 | py | Accepted | 20 | 5660 | 156 | while True:
q = int(input())
if q == -1:
break
x = q/2
while abs(x**3-q) >= 0.00001*q:
x = x-(x**3-q)/(3*x**2)
print(x)
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,068 |
s915691606 | p00080 | u397004753 | 1597545087 | Python | Python3 | py | Accepted | 20 | 5660 | 140 | while True:
q = int(input())
if q == -1:
break
x = q/2
while abs(x**3-q) >= 0.00001*q:
x = x - (x**3-q)/(3*x**2)
print(x)
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,069 |
s300434124 | p00080 | u053015104 | 1597402284 | Python | Python3 | py | Accepted | 20 | 5672 | 174 | while True:
q = int(input())
if q == -1:
break
x = q/2
while abs(x**3-q) >= 0.00001*q:
x = x - (x**3 - q)/(3*x**2)
print(f'{x:.6f}')
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,070 |
s636069176 | p00080 | u512192552 | 1597136973 | Python | Python3 | py | Accepted | 20 | 5680 | 251 | # coding: utf-8
# Your code here!
def san(x):
y=q/2
while True:
y=y-(y**3-x)/(3*y**2)
if abs(y**3-x)<0.00001*x:
break
print(f'{y:.6f}')
while True:
q=int(input())
if q==-1:
break
san(q)
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,071 |
s544536102 | p00080 | u695568874 | 1597075104 | Python | Python3 | py | Accepted | 20 | 5676 | 154 | while True:
q=int(input())
if q==-1:
break
x=q/2
while abs(x**3-q)>0.00001*q:
x=x-(x**3-q)/(3*x**2)
print(f'{x:.6f}')
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,072 |
s133741901 | p00080 | u991830357 | 1596935545 | Python | Python3 | py | Accepted | 20 | 5672 | 160 | while True:
n=int(input())
if n==-1:
break
a=n/2
while abs(a**3-n)>=0.00001*n:
a=a-(a**3-n)/(3*a**2)
print(f'{a:.6f}')
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,073 |
s112337245 | p00080 | u874049078 | 1596801886 | Python | Python3 | py | Accepted | 20 | 5680 | 170 | #84 三乗根
while True:
q=int(input())
if q==-1:
break
x=q/2
while abs(x**3-q)>=0.00001*q:
x=x-(x**3-q)/(3*x**2)
print(f'{x:.6f}')
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,074 |
s034292572 | p00080 | u251716708 | 1596553294 | Python | Python3 | py | Accepted | 20 | 5588 | 217 | while 1:
q=float(input())
if q<1:
break
xn=q/2
while 1:
xn=xn-(((xn*xn*xn)-q)/(3*(xn**2)))
if abs((xn*xn*xn)-q)<0.00001*q:
print(format(xn,'.6f'))
break
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,075 |
s374690079 | p00080 | u221550784 | 1596503523 | Python | Python3 | py | Accepted | 20 | 5672 | 182 | while True:
q=int(input())
if q==-1:
break
x=q/2
a=0.00001*q
while abs(x**3-q)>=a:
s=x*x
t=s*x-q
x-=t/(3*s)
print(f"{x:.6f}")
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,076 |
s633616813 | p00080 | u633358233 | 1596495146 | Python | Python3 | py | Accepted | 20 | 5676 | 183 | while True:
q=int(input())
if q==-1:
break
x=q/2
a=0.00001*q
while abs(x**3-q)>=a:
s=x*x
t=s*x-q
x-=t/(3*s)
print(f"{x:.6f}")
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,077 |
s867764573 | p00080 | u705625724 | 1596474311 | Python | Python3 | py | Accepted | 20 | 5684 | 183 | # coding: utf-8
# 84
while True:
q = int(input())
if q==-1:
break
x = q/2
while abs(x**3-q)>=0.00001*q:
x = x-(x**3-q)/(3*x**2)
print(f'{x:6f}')
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,078 |
s315014102 | p00080 | u677563181 | 1596461616 | Python | Python3 | py | Accepted | 30 | 5640 | 101 | for e in iter(input,'-1'):
q=float(e)
x=q/2
while abs(x**3-q)>=q*1e-5:x-=(x**3-q)/3/x/x
print(x)
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,079 |
s847390217 | p00080 | u635020217 | 1596457279 | Python | Python3 | py | Accepted | 20 | 5608 | 276 | # coding: utf-8
# Your code here!
while True:
q = int(input())
if q < 1:
break
x = q / 2
y = 0.00001 * q
while True:
x2 = x * x
r = x2 * x - q
if -y < r < y:
break
x = x - r / (3 * x2)
print(x)
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,080 |
s516911835 | p00080 | u826807985 | 1596437107 | Python | Python3 | py | Accepted | 20 | 5652 | 182 | while True:
q = float(input())
if q == -1:
break
x = q/2
while abs(x**3 - q) >= 0.00001*q:
x = x - (x**3 - q) / (3*x**2)
print(f'{x:.06f}')
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,081 |
s554159694 | p00080 | u711365732 | 1596385125 | Python | Python3 | py | Accepted | 20 | 5676 | 148 | while True:
q = int(input())
if q==-1:
break
x=q/2
while abs(x**3-q)>=0.00001*q:
x=x-(x**3-q)/(3*x**2)
print(f'{x:.6f}')
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,082 |
s985170852 | p00080 | u596129030 | 1596362680 | Python | Python3 | py | Accepted | 20 | 5672 | 169 | while True:
n=int(input())
if n==-1:
break
x=n/2
while abs(x**3-n)>=0.00001*n:
x=x-(x**3-n)/(3*x**2)
print(f'{x:.6f}')
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,083 |
s803165282 | p00080 | u037263780 | 1596353903 | Python | Python3 | py | Accepted | 20 | 5676 | 155 | while True:
q=int(input())
if q==-1:
break
x=q/2
while abs(x**3-q)>=0.00001*q:
x=x-(x**3-q)/(3*x**2)
print(f'{x:.6f}')
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,084 |
s209643904 | p00080 | u926092389 | 1596338505 | Python | Python3 | py | Accepted | 30 | 5736 | 220 | import math
while True:
q=int(input())
if q==-1:
break
x=q/2
while True:
if math.fabs((x**3)-q)<0.00001*q:
break
x=x-(x**3-q)/(3*(x**2))
print(f'{x:.6f}')
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,085 |
s327576023 | p00080 | u659772967 | 1596109205 | Python | Python3 | py | Accepted | 20 | 5672 | 156 | while True:
q=int(input())
if q==-1:
break
x=q/2
while abs(x**3-q)>=0.00001*q:
x=x-(x**3-q)/(3*x**2)
print(f'{x:.6f}')
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,086 |
s584719154 | p00080 | u272062354 | 1596077644 | Python | Python3 | py | Accepted | 20 | 5676 | 156 | while True:
q=int(input())
if q==-1:
break
x=q/2
while abs(x**3-q)>=0.00001*q:
x=x-(x**3-q)/(3*x**2)
print(f'{x:.6f}')
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,087 |
s010515373 | p00080 | u555228137 | 1595962203 | Python | Python3 | py | Accepted | 20 | 5672 | 155 | while True:
q=int(input())
if q==-1:
break
x=q/2
while abs(x**3-q)>=0.00001*q:
x=x-(x**3-q)/(3*x**2)
print(f'{x:.6f}')
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,088 |
s403093229 | p00080 | u630948380 | 1595895422 | Python | Python3 | py | Accepted | 30 | 5724 | 233 | import math
while True:
q=int(input())
if q==-1:
break
x=q/2
while True:
a=x**3-q
if math.fabs(a)<(0.00001*q):
break
x=x-(x**3-q)/(3*(x**2))
print(x)
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,089 |
s650595251 | p00080 | u470391435 | 1595844358 | Python | Python3 | py | Accepted | 20 | 5676 | 212 | def san(x):
y=q/2
while True:
y=y-(y**3-x)/(3*y**2)
if abs(y**3-x)<0.00001*x:
break
print(f'{y:.6f}')
while True:
q=int(input())
if q==-1:
break
san(q)
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,090 |
s637097104 | p00080 | u695386605 | 1595829378 | Python | Python3 | py | Accepted | 20 | 5660 | 328 | while True:
q = int(input())
if q == -1:
break
n = 1
while True:
if n == 1:
x = q / 2
n = n + 1
if n >= 2:
y = x
x = y - (y**3 - q) / (3 * (y**2))
n = n + 1
if abs(x**3 - q) < 0.00001 * q:
break
p... | p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,091 |
s814090802 | p00080 | u988962397 | 1595829353 | Python | Python3 | py | Accepted | 20 | 5656 | 209 | while True:
q=int(input())
if q==-1:
break
x=q/2
while True:
x=x-(x**3-q)/(3*x**2)
if abs(x**3-q)<0.00001*q:
break
print(x)
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,092 |
s001057610 | p00080 | u586171604 | 1595827873 | Python | Python3 | py | Accepted | 20 | 5664 | 247 | while True :
q = int(input())
if q == -1 :
break
n = 1
x = q / 2
while True :
if abs(x**3 - q) < (0.00001 * q) :
break
x = x - (x**3 - q) / (3 * x**2)
print('{:.6f}'.format(x))
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,093 |
s261791135 | p00080 | u895962529 | 1595379360 | Python | Python3 | py | Accepted | 20 | 5660 | 135 | while True:
q=int(input())
if q<1: break
x=q/2
while abs(x**3-q)>=0.00001*q:
x-=(x**3-q)/(3*x*x)
print(x)
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,094 |
s903019470 | p00080 | u753534330 | 1594746335 | Python | Python3 | py | Accepted | 20 | 5668 | 231 | import math
while 1:
q = int(input())
if q == -1:
break
x = q/2
while 1:
if abs(x*x*x - q) < (0.00001*q):
break
x -= (x*x*x - q) / (3*x*x)
print( '{:.6f}'.format(x))
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,095 |
s752998590 | p00080 | u350963229 | 1594562973 | Python | Python3 | py | Accepted | 20 | 5672 | 181 | while True:
q = int(input())
if q == -1:
break
x = q / 2
end = q * 10 ** -5
while abs(x ** 3 - q) >= end:
x = (2 * x ** 3 + q) / (3 * x ** 2)
print(f'{x:.6f}')
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,096 |
s903540564 | p00080 | u187074069 | 1594471941 | Python | Python3 | py | Accepted | 20 | 5664 | 234 | def thirdRoot(xn, q):
ans = xn - (x**3 - q)/(3 * (xn**2))
return ans
while True:
q = int(input())
if q == -1:
break
x = q/2
while abs(x**3 - q) >=0.00001*q:
x = thirdRoot(x, q)
print(x)
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,097 |
s098316718 | p00080 | u128671689 | 1594081579 | Python | Python3 | py | Accepted | 20 | 5684 | 181 | while True:
q=int(input())
if q==-1:
break
x=q/2
a=0.00001*q
while abs(x**3-q)>=a:
b=x**3-q
c=3*x**2
x-=b/c
print(f'{x:6f}')
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,098 |
s672898759 | p00080 | u647921435 | 1593480090 | Python | Python3 | py | Accepted | 20 | 5680 | 182 | while True:
q=int(input())
if q==-1:
break
x=q/2
a=0.00001*q
while abs(x**3-q)>=a:
s=x*x
t=s*x-q
x-=t/(3*s)
print(f"{x:.6f}")
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,099 |
s807141596 | p00080 | u228556128 | 1592316270 | Python | Python3 | py | Accepted | 20 | 5664 | 167 | while True:
q=int(input())
if q==-1:
break
x=q/2
while abs(x**3-q)>=0.00001*q:
x=x-((x**3-q)/(3*(x**2)))
print("{:.6f}".format(x))
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,100 |
s605335238 | p00080 | u583329397 | 1592223530 | Python | Python3 | py | Accepted | 20 | 5608 | 165 | while True:
q=int(input())
if q==-1:
break
x=q/2
ep=0.00001*q
while True:
x2=x*x
t=x2*x-q
if -ep<t<ep:
break
x=x-t/(3*x2)
print("%.06f" %x)
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,101 |
s099878082 | p00080 | u395654950 | 1592198061 | Python | Python3 | py | Accepted | 20 | 5664 | 201 | # coding: utf-8
# Your code here!
while True:
q = int(input())
if q == -1: break
x = q / 2
while abs(x ** 3 - q) >= 0.00001 * q:
x = x - (x ** 3 - q) / (3 * x ** 2)
print(x)
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,102 |
s071855153 | p00080 | u994684803 | 1591779461 | Python | Python3 | py | Accepted | 20 | 5660 | 204 | while True:
q = int(input())
if q == -1:
break
x = q / 2
while abs(x ** 3 - q) >= q * 0.00001:
x = (2 * x ** 3 + q) / (3 * x ** 2)
print("{:.6f}".format(x))
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,103 |
s422323945 | p00080 | u260980560 | 1590423208 | Python | Python3 | py | Accepted | 20 | 5672 | 306 | import sys
readline = sys.stdin.readline
write = sys.stdout.write
def solve():
q = int(readline())
if q == -1:
return False
x = q/2
lim = 0.00001 * q
while abs(x**3 - q) >= lim:
x = x - (x**3 - q)/(3*x**2)
write("%.16f\n" % x)
return True
while solve():
...
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,104 |
s672798151 | p00080 | u747915832 | 1590230329 | Python | Python3 | py | Accepted | 30 | 5736 | 256 | import math
while True:
q = int(input())
if q==-1:
break
x = q/2
while True:
if math.sqrt((x**3-q)**2) < 0.00001*q :
print(f'{x:.6f}')
break
x = x - (x**3-q)/(3*x**2)
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,105 |
s130910661 | p00080 | u240091169 | 1589333431 | Python | Python3 | py | Accepted | 20 | 5660 | 256 | while True :
q = int(input())
if q == -1 :
break
n = 1
x = q / 2
while True :
if abs(x**3 - q) < (0.00001 * q) :
break
x = x - (x**3 - q) / (3 * x**2)
print('{:.6f}'.format(x))
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,106 |
s999343203 | p00080 | u037441960 | 1589180773 | Python | Python3 | py | Accepted | 20 | 5676 | 218 | while True :
q = int(input())
if q == -1 :
break
else :
x = q / 2
while abs(x ** 3 - q) >= 0.00001 * q :
x -= ((x ** 3 - q) / (3 * x ** 2))
print(f"{x:.6f}")
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,107 |
s853624481 | p00080 | u014861569 | 1588964466 | Python | Python3 | py | Accepted | 20 | 5668 | 180 | while True:
q = int(input())
if q == -1:
break
x = q / 2
end = q * 10 ** -5
while abs(x ** 3 - q) >= end:
x = (2 * x ** 3 + q) / (3 * x ** 2)
print(f'{x:.6f}')
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,108 |
s118723722 | p00080 | u374434600 | 1586674759 | Python | Python3 | py | Accepted | 20 | 5728 | 340 | import sys
import math
def three(n,p):
m=float(n)-((math.pow(n,3)-p)/(3*math.pow(n,2)))
if((math.fabs((m*m*m)-p))<0.00001*p):
return m
else:
return (three(m,p))
i=0
while i<50:
q=int(input())
if(q==-1):
break
a=float(q)/2
three_pow=three(a,q)
print(str('{:.06f}'.f... | p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,109 |
s816945804 | p00080 | u630911389 | 1582126662 | Python | Python3 | py | Accepted | 20 | 5668 | 213 | def cubeRoot(q):
x = q / 2
while abs(x ** 3 - q) >= (0.00001 * q):
x = (2 * x ** 3 + q) / (3 * x ** 2)
return x
while True:
q = int(input())
if q == -1:
break
print(cubeRoot(q))
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,110 |
s976486804 | p00080 | u803862921 | 1573037094 | Python | Python3 | py | Accepted | 20 | 5664 | 252 | while True:
q = int(input())
if q < 0:
break
ep = q / 1e5
x = q/2
while True:
x = x - (x**3-q)/(3*(x**2))
if abs(x**3 -q) < ep:
break
print("{:.6f}".format(x))
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,111 |
s554660863 | p00080 | u824708460 | 1567685796 | Python | Python3 | py | Accepted | 20 | 5640 | 238 | while 1:
try:
q = float(input())
if q == -1:
break
x = q/2
while abs(x ** 3 - q) >= 0.00001 * q:
x = x - (x ** 3 - q) / (3 * x ** 2)
print(x)
except:
break
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,112 |
s826628717 | p00080 | u647694976 | 1559988456 | Python | Python3 | py | Accepted | 20 | 5664 | 272 | def calc_third_root(q):
x = q / 2
while not (abs(x ** 3 - q) < 0.00001 * q):
x = x - (x ** 3 - q) / (3.0 * x ** 2)
return x
while 1:
q = int(input())
if q == -1:
break
result = calc_third_root(q)
print("{:.6f}".format(result))
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,113 |
s276296687 | p00080 | u998437062 | 1554713976 | Python | Python3 | py | Accepted | 20 | 5660 | 171 | while True:
q = int(input())
if q == -1:
break
x = q / 2
while abs(x**3 - q) >= 0.00001 * q:
x = x - (x**3 - q) / (3 * x**2)
print(x)
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,114 |
s509927476 | p00080 | u990228206 | 1554282546 | Python | Python3 | py | Accepted | 20 | 5656 | 144 | while 1:
q=int(input())
if q==-1:break
ans=q/2
while abs(ans**3-q)>=q*10**-5:
ans-=(ans**3-q)/(3*ans**2)
print(ans)
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,115 |
s074614967 | p00080 | u563075864 | 1545008882 | Python | Python3 | py | Accepted | 20 | 5664 | 205 | def tri(q):
x = q/2
while(abs(x**3-q) >= 0.00001*q):
x = x - (x**3-q)/(3*x**2)
return x
while(1):
n = int(input())
if n == -1:
break
print("{:.6f}".format(tri(n)))
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,116 |
s606956181 | p00080 | u539753516 | 1533389699 | Python | Python3 | py | Accepted | 30 | 5576 | 126 | for q in iter(input,'-1'):
q=float(q)
x=q/2
while abs(x*x*x-q)>=q*.00001:
x-=(x*x*x-q)/3/x/x
print(x)
| p00080 |
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"], ["\\(","\\)"]], processEscapes: true }});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<H1>3乗根</H1>
<p>
$x^3 = q$ の解は漸化式 $x_{n+1} =... | 15
15
-1
| 2.466212
2.466212
| 12,117 |
s209541683 | p00081 | u506132575 | 1417700687 | Python | Python | py | Accepted | 10 | 4232 | 299 | import sys
for s in sys.stdin:
x1,y1,x2,y2,xq,yq = map(float,s.split(","))
dx,dy = x2-x1,y2-y1
det = dx*dx+dy*dy
y0 = dx*(y1*dx-x1*dy) + dy*(yq*dy+xq*dx)
x0 = -dy*(y1*dx-x1*dy) + dx*(yq*dy+xq*dx)
x0 /= det
y0 /= det
xp = x0+(x0-xq)
yp = y0+(y0-yq)
print xp,yp | p00081 |
<H1>線対称</H1>
<p>
平面上の異なる 3 点 <var>P1(x1,y1)</var>, <var>P2(x2,y2)</var>, <var>Q(xq,yq)</var> の座標の組を読み込んで、点 <var>P1</var> 点<var>P2</var> を通る直線を対称軸として点 <var>Q</var> と線対称の位置にある点 <var>R(x,y)</var> を出力するプログラムを作成してください。なお、点 <var>Q</var> は、その対称軸上にないものとします。
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/i... | 1.0,0.0,-1.0,0.0,1.0,1.0
1.0,0.0,0.0,-1.0,3.0,0.0
0.0,1.0,0.0,-1.0,1.0,1.0
| 1.000000 -1.000000
1.000000 2.000000
-1.000000 1.000000
| 12,118 |
s618874305 | p00081 | u567380442 | 1424690491 | Python | Python3 | py | Accepted | 30 | 6760 | 416 | import sys
f = sys.stdin
def take2(iterable):
while True:
yield next(iterable), next(iterable)
for line in f:
p1,p2,pq = [x + y * 1j for x, y in take2(map(float, line.split(',')))]
v21 = p2 - p1
vq1 = pq - p1
px = vq1* (v21.real - v21.imag * 1j)
px = px.real - px.imag * 1j
px ... | p00081 |
<H1>線対称</H1>
<p>
平面上の異なる 3 点 <var>P1(x1,y1)</var>, <var>P2(x2,y2)</var>, <var>Q(xq,yq)</var> の座標の組を読み込んで、点 <var>P1</var> 点<var>P2</var> を通る直線を対称軸として点 <var>Q</var> と線対称の位置にある点 <var>R(x,y)</var> を出力するプログラムを作成してください。なお、点 <var>Q</var> は、その対称軸上にないものとします。
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/i... | 1.0,0.0,-1.0,0.0,1.0,1.0
1.0,0.0,0.0,-1.0,3.0,0.0
0.0,1.0,0.0,-1.0,1.0,1.0
| 1.000000 -1.000000
1.000000 2.000000
-1.000000 1.000000
| 12,119 |
s327833058 | p00081 | u140201022 | 1451480872 | Python | Python | py | Accepted | 10 | 6368 | 266 | def sp(a,b,c,xq,yq):
xr=xq-2*a*(a*xq+b*yq+c)/(a**2+b**2)
yr=yq-2*b*(a*xq+b*yq+c)/(a**2+b**2)
print xr,yr
while 1:
try:
x1,y1,x2,y2,xq,yq=map(float,raw_input().split(','))
sp(y2-y1,-(x2-x1),x2*y1-x1*y2,xq,yq)
except:
break | p00081 |
<H1>線対称</H1>
<p>
平面上の異なる 3 点 <var>P1(x1,y1)</var>, <var>P2(x2,y2)</var>, <var>Q(xq,yq)</var> の座標の組を読み込んで、点 <var>P1</var> 点<var>P2</var> を通る直線を対称軸として点 <var>Q</var> と線対称の位置にある点 <var>R(x,y)</var> を出力するプログラムを作成してください。なお、点 <var>Q</var> は、その対称軸上にないものとします。
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/i... | 1.0,0.0,-1.0,0.0,1.0,1.0
1.0,0.0,0.0,-1.0,3.0,0.0
0.0,1.0,0.0,-1.0,1.0,1.0
| 1.000000 -1.000000
1.000000 2.000000
-1.000000 1.000000
| 12,120 |
s313646926 | p00081 | u529386725 | 1454784895 | Python | Python3 | py | Accepted | 20 | 7588 | 445 | def dot(x, y):
return (x.conjugate() * y).real
def project(p, d):
return dot(p, d) / abs(d)
def line_sym(p, x1, x2):
p -= x1
d = x2 -x1
return d * p.conjugate() / d.conjugate() + x1
import sys
p = []
for line in sys.stdin:
x1, y1, x2, y2, xq, yq = map(float, line.split(','))
p1 = com... | p00081 |
<H1>線対称</H1>
<p>
平面上の異なる 3 点 <var>P1(x1,y1)</var>, <var>P2(x2,y2)</var>, <var>Q(xq,yq)</var> の座標の組を読み込んで、点 <var>P1</var> 点<var>P2</var> を通る直線を対称軸として点 <var>Q</var> と線対称の位置にある点 <var>R(x,y)</var> を出力するプログラムを作成してください。なお、点 <var>Q</var> は、その対称軸上にないものとします。
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/i... | 1.0,0.0,-1.0,0.0,1.0,1.0
1.0,0.0,0.0,-1.0,3.0,0.0
0.0,1.0,0.0,-1.0,1.0,1.0
| 1.000000 -1.000000
1.000000 2.000000
-1.000000 1.000000
| 12,121 |
s836086532 | p00081 | u203261375 | 1466929793 | Python | Python3 | py | Accepted | 30 | 7456 | 343 | def line_sym(p, x1, x2):
p -= x1
d = x2 -x1
return d * p.conjugate() / d.conjugate() + x1
import sys
p = []
for line in sys.stdin:
x1, y1, x2, y2, xq, yq = map(float, line.split(','))
p1 = complex(x1, y1)
p2 = complex(x2, y2)
q = complex(xq, yq)
r = line_sym(q, p1, p2)
... | p00081 |
<H1>線対称</H1>
<p>
平面上の異なる 3 点 <var>P1(x1,y1)</var>, <var>P2(x2,y2)</var>, <var>Q(xq,yq)</var> の座標の組を読み込んで、点 <var>P1</var> 点<var>P2</var> を通る直線を対称軸として点 <var>Q</var> と線対称の位置にある点 <var>R(x,y)</var> を出力するプログラムを作成してください。なお、点 <var>Q</var> は、その対称軸上にないものとします。
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/i... | 1.0,0.0,-1.0,0.0,1.0,1.0
1.0,0.0,0.0,-1.0,3.0,0.0
0.0,1.0,0.0,-1.0,1.0,1.0
| 1.000000 -1.000000
1.000000 2.000000
-1.000000 1.000000
| 12,122 |
s878577534 | p00081 | u078042885 | 1483793236 | Python | Python3 | py | Accepted | 20 | 7444 | 262 | while 1:
try:
x,y,xx,yy,l,ll=map(float,input().split(','))
p=complex(x,y)
pp=complex(xx,yy)
lp=complex(l,ll)
lp-=p
a=pp-p
b=a*lp.conjugate()/a.conjugate()+p
print(b.real,b.imag)
except:break | p00081 |
<H1>線対称</H1>
<p>
平面上の異なる 3 点 <var>P1(x1,y1)</var>, <var>P2(x2,y2)</var>, <var>Q(xq,yq)</var> の座標の組を読み込んで、点 <var>P1</var> 点<var>P2</var> を通る直線を対称軸として点 <var>Q</var> と線対称の位置にある点 <var>R(x,y)</var> を出力するプログラムを作成してください。なお、点 <var>Q</var> は、その対称軸上にないものとします。
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/i... | 1.0,0.0,-1.0,0.0,1.0,1.0
1.0,0.0,0.0,-1.0,3.0,0.0
0.0,1.0,0.0,-1.0,1.0,1.0
| 1.000000 -1.000000
1.000000 2.000000
-1.000000 1.000000
| 12,123 |
s832897919 | p00081 | u546285759 | 1486457903 | Python | Python3 | py | Accepted | 20 | 7800 | 288 | from math import *
while True:
try:
x1,y1,x2,y2,xp,yp= map(float, input().split(','))
except:
break
ang, x, y= (atan2(yp-y1, xp-x1)-atan2(y2-y1, x2-x1)) * -2.0, xp-x1, yp-y1
print("{0:.6f} {1:.6f}".format(x*cos(ang)-y*sin(ang)+x1,y*cos(ang)+x*sin(ang)+y1)) | p00081 |
<H1>線対称</H1>
<p>
平面上の異なる 3 点 <var>P1(x1,y1)</var>, <var>P2(x2,y2)</var>, <var>Q(xq,yq)</var> の座標の組を読み込んで、点 <var>P1</var> 点<var>P2</var> を通る直線を対称軸として点 <var>Q</var> と線対称の位置にある点 <var>R(x,y)</var> を出力するプログラムを作成してください。なお、点 <var>Q</var> は、その対称軸上にないものとします。
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/i... | 1.0,0.0,-1.0,0.0,1.0,1.0
1.0,0.0,0.0,-1.0,3.0,0.0
0.0,1.0,0.0,-1.0,1.0,1.0
| 1.000000 -1.000000
1.000000 2.000000
-1.000000 1.000000
| 12,124 |
s291238914 | p00081 | u462831976 | 1493361377 | Python | Python3 | py | Accepted | 30 | 7564 | 1,181 | # -*- coding: utf-8 -*-
import sys
import os
import math
class Vector2():
def __init__(self, x, y):
self._x = float(x)
self._y = float(y)
def normalize(self):
norm = self.norm()
return Vector2(self._x / norm, self._y / norm)
def norm(self):
return math.sqrt(self._... | p00081 |
<H1>線対称</H1>
<p>
平面上の異なる 3 点 <var>P1(x1,y1)</var>, <var>P2(x2,y2)</var>, <var>Q(xq,yq)</var> の座標の組を読み込んで、点 <var>P1</var> 点<var>P2</var> を通る直線を対称軸として点 <var>Q</var> と線対称の位置にある点 <var>R(x,y)</var> を出力するプログラムを作成してください。なお、点 <var>Q</var> は、その対称軸上にないものとします。
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/i... | 1.0,0.0,-1.0,0.0,1.0,1.0
1.0,0.0,0.0,-1.0,3.0,0.0
0.0,1.0,0.0,-1.0,1.0,1.0
| 1.000000 -1.000000
1.000000 2.000000
-1.000000 1.000000
| 12,125 |
s682758850 | p00081 | u371539389 | 1498139563 | Python | Python3 | py | Accepted | 50 | 10140 | 595 | from decimal import Decimal as D
import sys
def naiseki(A,B):
return A[0]*B[0]+A[1]*B[1]
def scaler(k,A):
return[k*A[0],k*A[1]]
def size(A):
return A[0]**2+A[1]**2
def plus(A,B):
return [A[0]+B[0],A[1]+B[1]]
while True:
try:
x1,y1,x2,y2,xq,yq=[D(i) for i in input().split(",")]
P1P2... | p00081 |
<H1>線対称</H1>
<p>
平面上の異なる 3 点 <var>P1(x1,y1)</var>, <var>P2(x2,y2)</var>, <var>Q(xq,yq)</var> の座標の組を読み込んで、点 <var>P1</var> 点<var>P2</var> を通る直線を対称軸として点 <var>Q</var> と線対称の位置にある点 <var>R(x,y)</var> を出力するプログラムを作成してください。なお、点 <var>Q</var> は、その対称軸上にないものとします。
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/i... | 1.0,0.0,-1.0,0.0,1.0,1.0
1.0,0.0,0.0,-1.0,3.0,0.0
0.0,1.0,0.0,-1.0,1.0,1.0
| 1.000000 -1.000000
1.000000 2.000000
-1.000000 1.000000
| 12,126 |
s158460873 | p00081 | u957021183 | 1505195140 | Python | Python3 | py | Accepted | 30 | 7572 | 586 | # Aizu Problem 0081: Symmetric Point
#
import sys, math, os
# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
sys.stdin = open("sample-input.txt", "rt")
def symmetric_point(x1, y1, x2, y2, xq, yq):
rx = x2 - x1
ry = y2 - y1
det = -rx**2 - ry**2
det_s = rx * (yq - y1) - ry * (xq - x1... | p00081 |
<H1>線対称</H1>
<p>
平面上の異なる 3 点 <var>P1(x1,y1)</var>, <var>P2(x2,y2)</var>, <var>Q(xq,yq)</var> の座標の組を読み込んで、点 <var>P1</var> 点<var>P2</var> を通る直線を対称軸として点 <var>Q</var> と線対称の位置にある点 <var>R(x,y)</var> を出力するプログラムを作成してください。なお、点 <var>Q</var> は、その対称軸上にないものとします。
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/i... | 1.0,0.0,-1.0,0.0,1.0,1.0
1.0,0.0,0.0,-1.0,3.0,0.0
0.0,1.0,0.0,-1.0,1.0,1.0
| 1.000000 -1.000000
1.000000 2.000000
-1.000000 1.000000
| 12,127 |
s157045977 | p00081 | u811733736 | 1505374401 | Python | Python3 | py | Accepted | 30 | 7804 | 6,924 | # -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0081
"""
import sys
from sys import stdin
input = stdin.readline
class Point(object):
epsilon = 1e-10
def __init__(self, x=0.0, y=0.0):
if isinstance(x, tuple):
self.x = x[0]
self.y = x[1]
... | p00081 |
<H1>線対称</H1>
<p>
平面上の異なる 3 点 <var>P1(x1,y1)</var>, <var>P2(x2,y2)</var>, <var>Q(xq,yq)</var> の座標の組を読み込んで、点 <var>P1</var> 点<var>P2</var> を通る直線を対称軸として点 <var>Q</var> と線対称の位置にある点 <var>R(x,y)</var> を出力するプログラムを作成してください。なお、点 <var>Q</var> は、その対称軸上にないものとします。
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/i... | 1.0,0.0,-1.0,0.0,1.0,1.0
1.0,0.0,0.0,-1.0,3.0,0.0
0.0,1.0,0.0,-1.0,1.0,1.0
| 1.000000 -1.000000
1.000000 2.000000
-1.000000 1.000000
| 12,128 |
s251880625 | p00081 | u024715419 | 1519365476 | Python | Python3 | py | Accepted | 20 | 5580 | 537 | while True:
try:
x1, y1, x2, y2, xq, yq = map(float, input().split(","))
if (y2-y1) == 0:
xr = xq
yr = 2*y1 - yq
elif (x2-x1) == 0:
xr = 2*x1 - xq
yr = yq
else:
a12 = (y2-y1)/(x2-x1)
aqr = -1/a12
b12 ... | p00081 |
<H1>線対称</H1>
<p>
平面上の異なる 3 点 <var>P1(x1,y1)</var>, <var>P2(x2,y2)</var>, <var>Q(xq,yq)</var> の座標の組を読み込んで、点 <var>P1</var> 点<var>P2</var> を通る直線を対称軸として点 <var>Q</var> と線対称の位置にある点 <var>R(x,y)</var> を出力するプログラムを作成してください。なお、点 <var>Q</var> は、その対称軸上にないものとします。
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/i... | 1.0,0.0,-1.0,0.0,1.0,1.0
1.0,0.0,0.0,-1.0,3.0,0.0
0.0,1.0,0.0,-1.0,1.0,1.0
| 1.000000 -1.000000
1.000000 2.000000
-1.000000 1.000000
| 12,129 |
s055385360 | p00081 | u043254318 | 1519405742 | Python | Python3 | py | Accepted | 20 | 5640 | 522 | import math
def get_input():
while True:
try:
yield ''.join(input())
except EOFError:
break
N = list(get_input())
for l in range(len(N)):
x1,y1,x2,y2,xq,yq = [float(i) for i in N[l].split(",")]
# l: a*x + b*y + c = 0
a = y2-y1
b = x1-x2
c = y1*(x2-x1) ... | p00081 |
<H1>線対称</H1>
<p>
平面上の異なる 3 点 <var>P1(x1,y1)</var>, <var>P2(x2,y2)</var>, <var>Q(xq,yq)</var> の座標の組を読み込んで、点 <var>P1</var> 点<var>P2</var> を通る直線を対称軸として点 <var>Q</var> と線対称の位置にある点 <var>R(x,y)</var> を出力するプログラムを作成してください。なお、点 <var>Q</var> は、その対称軸上にないものとします。
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/i... | 1.0,0.0,-1.0,0.0,1.0,1.0
1.0,0.0,0.0,-1.0,3.0,0.0
0.0,1.0,0.0,-1.0,1.0,1.0
| 1.000000 -1.000000
1.000000 2.000000
-1.000000 1.000000
| 12,130 |
s099966089 | p00081 | u150984829 | 1520138022 | Python | Python3 | py | Accepted | 20 | 5764 | 195 | import sys
from math import*
for e in sys.stdin:
a,b,c,d,x,y=map(float,e.split(','))
g=-2*(atan2(y-b,x-a)-atan2(d-b,c-a));s,t=sin(g),cos(g);x-=a;y-=b
print(f'{t*x-s*y+a:.6f} {s*x+t*y+b:.6f}')
| p00081 |
<H1>線対称</H1>
<p>
平面上の異なる 3 点 <var>P1(x1,y1)</var>, <var>P2(x2,y2)</var>, <var>Q(xq,yq)</var> の座標の組を読み込んで、点 <var>P1</var> 点<var>P2</var> を通る直線を対称軸として点 <var>Q</var> と線対称の位置にある点 <var>R(x,y)</var> を出力するプログラムを作成してください。なお、点 <var>Q</var> は、その対称軸上にないものとします。
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/i... | 1.0,0.0,-1.0,0.0,1.0,1.0
1.0,0.0,0.0,-1.0,3.0,0.0
0.0,1.0,0.0,-1.0,1.0,1.0
| 1.000000 -1.000000
1.000000 2.000000
-1.000000 1.000000
| 12,131 |
s715857841 | p00081 | u150984829 | 1520138082 | Python | Python3 | py | Accepted | 30 | 5752 | 177 | import sys
from math import*
for e in sys.stdin:
a,b,c,d,x,y=map(float,e.split(','))
g=2*atan2(d-b,c-a);s,t=sin(g),cos(g);x-=a;y-=b
print(f'{t*x+s*y+a:.6f} {s*x-t*y+b:.6f}')
| p00081 |
<H1>線対称</H1>
<p>
平面上の異なる 3 点 <var>P1(x1,y1)</var>, <var>P2(x2,y2)</var>, <var>Q(xq,yq)</var> の座標の組を読み込んで、点 <var>P1</var> 点<var>P2</var> を通る直線を対称軸として点 <var>Q</var> と線対称の位置にある点 <var>R(x,y)</var> を出力するプログラムを作成してください。なお、点 <var>Q</var> は、その対称軸上にないものとします。
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/i... | 1.0,0.0,-1.0,0.0,1.0,1.0
1.0,0.0,0.0,-1.0,3.0,0.0
0.0,1.0,0.0,-1.0,1.0,1.0
| 1.000000 -1.000000
1.000000 2.000000
-1.000000 1.000000
| 12,132 |
s983952997 | p00081 | u150984829 | 1520138084 | Python | Python3 | py | Accepted | 20 | 5756 | 177 | import sys
from math import*
for e in sys.stdin:
a,b,c,d,x,y=map(float,e.split(','))
g=2*atan2(d-b,c-a);s,t=sin(g),cos(g);x-=a;y-=b
print(f'{t*x+s*y+a:.6f} {s*x-t*y+b:.6f}')
| p00081 |
<H1>線対称</H1>
<p>
平面上の異なる 3 点 <var>P1(x1,y1)</var>, <var>P2(x2,y2)</var>, <var>Q(xq,yq)</var> の座標の組を読み込んで、点 <var>P1</var> 点<var>P2</var> を通る直線を対称軸として点 <var>Q</var> と線対称の位置にある点 <var>R(x,y)</var> を出力するプログラムを作成してください。なお、点 <var>Q</var> は、その対称軸上にないものとします。
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/i... | 1.0,0.0,-1.0,0.0,1.0,1.0
1.0,0.0,0.0,-1.0,3.0,0.0
0.0,1.0,0.0,-1.0,1.0,1.0
| 1.000000 -1.000000
1.000000 2.000000
-1.000000 1.000000
| 12,133 |
s706208475 | p00081 | u150984829 | 1520138693 | Python | Python3 | py | Accepted | 20 | 5644 | 200 | import sys
from math import*
for e in sys.stdin:
a,b,c,d,e,f=map(float,e.split(','))
z,w,q=complex(a,b),complex(c,d),complex(e,f)
z+=(z-w)*(q-z).conjugate()/(z-w).conjugate()
print(z.real,z.imag)
| p00081 |
<H1>線対称</H1>
<p>
平面上の異なる 3 点 <var>P1(x1,y1)</var>, <var>P2(x2,y2)</var>, <var>Q(xq,yq)</var> の座標の組を読み込んで、点 <var>P1</var> 点<var>P2</var> を通る直線を対称軸として点 <var>Q</var> と線対称の位置にある点 <var>R(x,y)</var> を出力するプログラムを作成してください。なお、点 <var>Q</var> は、その対称軸上にないものとします。
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/i... | 1.0,0.0,-1.0,0.0,1.0,1.0
1.0,0.0,0.0,-1.0,3.0,0.0
0.0,1.0,0.0,-1.0,1.0,1.0
| 1.000000 -1.000000
1.000000 2.000000
-1.000000 1.000000
| 12,134 |
s258325856 | p00081 | u150984829 | 1520139615 | Python | Python3 | py | Accepted | 20 | 5648 | 196 | import sys
from math import*
for e in sys.stdin:
a,b,c,d,e,f=map(float,e.split(','))
z,w,q=complex(a,b),complex(c,d),complex(e,f)
z+=((z-w)/abs(z-w))**2*(q-z).conjugate()
print(z.real,z.imag)
| p00081 |
<H1>線対称</H1>
<p>
平面上の異なる 3 点 <var>P1(x1,y1)</var>, <var>P2(x2,y2)</var>, <var>Q(xq,yq)</var> の座標の組を読み込んで、点 <var>P1</var> 点<var>P2</var> を通る直線を対称軸として点 <var>Q</var> と線対称の位置にある点 <var>R(x,y)</var> を出力するプログラムを作成してください。なお、点 <var>Q</var> は、その対称軸上にないものとします。
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/i... | 1.0,0.0,-1.0,0.0,1.0,1.0
1.0,0.0,0.0,-1.0,3.0,0.0
0.0,1.0,0.0,-1.0,1.0,1.0
| 1.000000 -1.000000
1.000000 2.000000
-1.000000 1.000000
| 12,135 |
s951180202 | p00081 | u150984829 | 1520139784 | Python | Python3 | py | Accepted | 20 | 5644 | 196 | import sys
from math import*
for e in sys.stdin:
a,b,c,d,e,f=map(float,e.split(','))
z,w,q=complex(a,b),complex(c,d),complex(e,f)
w-=z
z+=(w/abs(w))**2*(q-z).conjugate()
print(z.real,z.imag)
| p00081 |
<H1>線対称</H1>
<p>
平面上の異なる 3 点 <var>P1(x1,y1)</var>, <var>P2(x2,y2)</var>, <var>Q(xq,yq)</var> の座標の組を読み込んで、点 <var>P1</var> 点<var>P2</var> を通る直線を対称軸として点 <var>Q</var> と線対称の位置にある点 <var>R(x,y)</var> を出力するプログラムを作成してください。なお、点 <var>Q</var> は、その対称軸上にないものとします。
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/i... | 1.0,0.0,-1.0,0.0,1.0,1.0
1.0,0.0,0.0,-1.0,3.0,0.0
0.0,1.0,0.0,-1.0,1.0,1.0
| 1.000000 -1.000000
1.000000 2.000000
-1.000000 1.000000
| 12,136 |
s166653161 | p00081 | u136916346 | 1528768829 | Python | Python3 | py | Accepted | 30 | 6388 | 317 | import sys
from decimal import Decimal
for l in sys.stdin:
x1,y1,x2,y2,xq,yq=list(map(Decimal,l.split(",")))
a=x1-x2
b=y1-y2
c=xq-2*x1
d=yq-2*y1
e=yq-y1
X=(xq*a**2-c*b**2+2*e*a*b)/(a**2+b**2)
try:
Y=b/a*(X+c)-d
except:
Y=-a/b*(X-xq)+yq
print(" ".join(["{:.6f}".format(i) for i in [X,Y]]))
| p00081 |
<H1>線対称</H1>
<p>
平面上の異なる 3 点 <var>P1(x1,y1)</var>, <var>P2(x2,y2)</var>, <var>Q(xq,yq)</var> の座標の組を読み込んで、点 <var>P1</var> 点<var>P2</var> を通る直線を対称軸として点 <var>Q</var> と線対称の位置にある点 <var>R(x,y)</var> を出力するプログラムを作成してください。なお、点 <var>Q</var> は、その対称軸上にないものとします。
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/i... | 1.0,0.0,-1.0,0.0,1.0,1.0
1.0,0.0,0.0,-1.0,3.0,0.0
0.0,1.0,0.0,-1.0,1.0,1.0
| 1.000000 -1.000000
1.000000 2.000000
-1.000000 1.000000
| 12,137 |
s212844738 | p00081 | u847467233 | 1529202852 | Python | Python3 | py | Accepted | 20 | 5608 | 572 | # AOJ 0081 A Symmetric Point
# Python3 2018.6.17 bal4u
def dot(a, b):
return a.real*b.real + a.imag*b.imag
def norm(a):
return a.real**2 + a.imag**2
def project(line, p):
base = line[1]-line[0]
r = dot(p-line[0], base) / norm(base)
return line[0] + base*r
def symmetric_Point(line, p):
return p + 2*(project... | p00081 |
<H1>線対称</H1>
<p>
平面上の異なる 3 点 <var>P1(x1,y1)</var>, <var>P2(x2,y2)</var>, <var>Q(xq,yq)</var> の座標の組を読み込んで、点 <var>P1</var> 点<var>P2</var> を通る直線を対称軸として点 <var>Q</var> と線対称の位置にある点 <var>R(x,y)</var> を出力するプログラムを作成してください。なお、点 <var>Q</var> は、その対称軸上にないものとします。
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/i... | 1.0,0.0,-1.0,0.0,1.0,1.0
1.0,0.0,0.0,-1.0,3.0,0.0
0.0,1.0,0.0,-1.0,1.0,1.0
| 1.000000 -1.000000
1.000000 2.000000
-1.000000 1.000000
| 12,138 |
s200740344 | p00081 | u089116225 | 1529514763 | Python | Python3 | py | Accepted | 20 | 5608 | 516 | def dot(a, b):
return a.real*b.real + a.imag*b.imag
def norm(a):
return a.real**2 + a.imag**2
def project(line, p):
base = line[1]-line[0]
r = dot(p-line[0], base) / norm(base)
return line[0] + base*r
def symmetric_Point(line, p):
return p + 2*(project(line, p)-p)
while True:
try: p = list(map(float, inpu... | p00081 |
<H1>線対称</H1>
<p>
平面上の異なる 3 点 <var>P1(x1,y1)</var>, <var>P2(x2,y2)</var>, <var>Q(xq,yq)</var> の座標の組を読み込んで、点 <var>P1</var> 点<var>P2</var> を通る直線を対称軸として点 <var>Q</var> と線対称の位置にある点 <var>R(x,y)</var> を出力するプログラムを作成してください。なお、点 <var>Q</var> は、その対称軸上にないものとします。
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/i... | 1.0,0.0,-1.0,0.0,1.0,1.0
1.0,0.0,0.0,-1.0,3.0,0.0
0.0,1.0,0.0,-1.0,1.0,1.0
| 1.000000 -1.000000
1.000000 2.000000
-1.000000 1.000000
| 12,139 |
s673968547 | p00081 | u089116225 | 1529516802 | Python | Python3 | py | Accepted | 20 | 5612 | 615 | def vec(s,t):
return [t[0]-s[0],t[1]-s[1]]
def dot(a,b):
return a[0]*b[0]+a[1]*b[1]
def scalsquared(a):
return (a[0]**2+a[1]**2)
def project(p,a,b):
k = dot(vec(a,p),vec(a,b)) / scalsquared(vec(a,b))
return [a[0]+k*(b[0]-a[0]), a[1]+k*(b[1]-a[1])]
def symmetrical_point(p,q):
return [p[0]+2*(... | p00081 |
<H1>線対称</H1>
<p>
平面上の異なる 3 点 <var>P1(x1,y1)</var>, <var>P2(x2,y2)</var>, <var>Q(xq,yq)</var> の座標の組を読み込んで、点 <var>P1</var> 点<var>P2</var> を通る直線を対称軸として点 <var>Q</var> と線対称の位置にある点 <var>R(x,y)</var> を出力するプログラムを作成してください。なお、点 <var>Q</var> は、その対称軸上にないものとします。
</p>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/i... | 1.0,0.0,-1.0,0.0,1.0,1.0
1.0,0.0,0.0,-1.0,3.0,0.0
0.0,1.0,0.0,-1.0,1.0,1.0
| 1.000000 -1.000000
1.000000 2.000000
-1.000000 1.000000
| 12,140 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.