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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s897168448
|
p00013
|
u212392281
|
1564853404
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5596
| 219
|
l1 = []
l2 = []
try:
while(True):
n = int(input())
if n == 0:
l2.append(l1[-1])
del l1[-1]
else:
l1.append(n)
except:
pass
for i in l2:
print(i)
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,802
|
s466936295
|
p00013
|
u108130680
|
1564848752
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5584
| 146
|
list=[]
while True:
try:
n = int(input())
if n==0:
print(list.pop())
else:
list.append(n)
except EOFError:
break
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,803
|
s926319493
|
p00013
|
u051789695
|
1562424305
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5996
| 178
|
from collections import deque
q=deque([])
while True:
try:
n=int(input())
except:
break
if n==0:
print(q.pop())
else:
q.append(n)
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,804
|
s760554492
|
p00013
|
u264450287
|
1561960960
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5584
| 136
|
D=[]
while True:
try:
n=int(input())
if n==0:
print(D.pop(-1))
else:
D.append(n)
except EOFError:
break
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,805
|
s104072871
|
p00013
|
u179046735
|
1560584443
|
Python
|
Python3
|
py
|
Accepted
| 30
|
5996
| 176
|
from collections import deque
cars=deque()
while(True):
try:
n=int(input())
print(cars.popleft()) if n==0 else cars.appendleft(n)
except:
break
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,806
|
s969290415
|
p00013
|
u548252256
|
1560161089
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5600
| 176
|
if __name__ == '__main__':
A = []
while True:
try:
n = int(input())
if n == 0:
print(A[-1])
A.pop(-1)
else:
A.append(n)
except EOFError:
break
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,807
|
s305436560
|
p00013
|
u506537276
|
1560144496
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5584
| 140
|
c = []
while True:
try:
n = int(input())
if n == 0:
print(c.pop())
else:
c.append(n)
except EOFError:
break
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,808
|
s822563956
|
p00013
|
u990459103
|
1559635365
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5588
| 153
|
car = []
while True:
try:
x =int(input())
if x == 0:
print(car.pop())
else:
car.append(x)
except:break
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,809
|
s554992517
|
p00013
|
u477023447
|
1559616672
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5588
| 296
|
car = []
while 1:
try:
i = int(input())
if i == 0:
print(car.pop())
else:
car.append(i)
except ValueError:
print(car)
for j in range(len(car)):
print(car.pop())
break
except EOFError:
break
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,810
|
s817568743
|
p00013
|
u904226154
|
1557277016
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5588
| 195
|
cars = []
while True:
try:
inVal = int(input())
if inVal == 0:
print(cars.pop(-1))
else:
cars.append(inVal)
except EOFError:
break
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,811
|
s339741573
|
p00013
|
u406093358
|
1555467560
|
Python
|
Python
|
py
|
Accepted
| 10
|
4624
| 118
|
import sys
stack = []
for line in sys.stdin:
n = int(line)
if n == 0:
print stack.pop(-1)
else: stack.append(n)
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,812
|
s837621495
|
p00013
|
u647694976
|
1554882152
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5588
| 159
|
car=[]
while True:
try:
n=int(input())
if n!=0:
car.append(n)
else:
print(car.pop())
except:break
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,813
|
s842738256
|
p00013
|
u625806423
|
1553785603
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5592
| 161
|
stack = []
while True:
try:
num = int(input())
except EOFError:
break
if num != 0:
stack.append(num)
elif num == 0:
print(stack.pop(-1))
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,814
|
s457039850
|
p00013
|
u350155409
|
1552728323
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5592
| 143
|
import sys
stack = []
for nstr in sys.stdin:
n = int(nstr)
if n == 0:
print(stack.pop())
else:
stack.append(n)
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,815
|
s820282735
|
p00013
|
u314832372
|
1551169238
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5556
| 253
|
list1 = []
for i in range(1, 200):
try:
str1 = input()
if str1 != '0' and str1 != '':
list1.append(str1)
elif str1 == '0':
print(list1.pop())
else:
break
except:
break
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,816
|
s570122350
|
p00013
|
u051394180
|
1549246427
|
Python
|
Python
|
py
|
Accepted
| 10
|
4632
| 185
|
stack = []
while True:
try:
data = int(input())
if data == 0:
print stack.pop()
else:
stack.append(data)
except:
break
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,817
|
s345633414
|
p00013
|
u689047545
|
1547909026
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5584
| 246
|
if __name__ == '__main__':
lst = []
while True:
try:
n = int(input())
if n == 0:
print (lst.pop())
else:
lst.append(n)
except EOFError:
break
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,818
|
s248724143
|
p00013
|
u563075864
|
1542376066
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5596
| 249
|
x = []
while(1):
try:
a = int(input())
if a == 0:
print(x[-1])
x.pop(len(x)-1)
# if len(x) == 0:
# break
else:
x.append(a)
except EOFError:
break
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,819
|
s907604285
|
p00013
|
u067299340
|
1542163720
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5556
| 186
|
stack = []
while True:
try:
i = input()
if i == "0":
print(stack.pop(0))
else:
stack.insert(0, i)
except EOFError:
break
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,820
|
s689717419
|
p00013
|
u717526540
|
1541641827
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5588
| 168
|
l = []
while(1):
try:
n = int(input())
except:
break
if n == 0:
ans = l.pop(-1)
print(ans)
else:
l.append(n)
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,821
|
s373348438
|
p00013
|
u725998488
|
1539098843
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5588
| 155
|
li = []
while True:
try:
n = int(input())
except:
break
if n == 0:
print(li.pop())
else:
li.append(n)
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,822
|
s295981583
|
p00013
|
u219940997
|
1537449073
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5592
| 161
|
ans = []
while True:
try:
x = int(input())
if x == 0:
print(ans.pop())
else:
ans.append(x)
except: break
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,823
|
s973314044
|
p00013
|
u319725914
|
1534218227
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5584
| 167
|
ar = []
while(True):
try:
n = int(input())
if n == 0:
print(ar.pop())
else:
ar.append(n)
except:
break
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,824
|
s062037067
|
p00013
|
u252700163
|
1532760798
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5584
| 134
|
q = []
while True:
try:
i = int(input())
if i == 0:
print(q.pop())
else:
q.append( i )
except:
break
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,825
|
s224680641
|
p00013
|
u539753516
|
1532325168
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5560
| 177
|
waits=[]
while 1:
try:
i=input()
if i=="0":
print(waits[-1])
waits.pop()
else:
waits.append(i)
except:break
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,826
|
s490696524
|
p00013
|
u454636644
|
1525948111
|
Python
|
Python3
|
py
|
Accepted
| 30
|
6000
| 200
|
from collections import deque
import sys
train = deque([])
for line in sys.stdin:
n = int(line)
if n == 0:
t = train.popleft()
print(t)
else:
train.appendleft(n)
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,827
|
s245053271
|
p00013
|
u853158149
|
1521972594
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5592
| 174
|
nlist = []
while 1:
try:
n = int(input())
if n == 0:
print(nlist.pop(-1))
else:
nlist.append(n)
except:
break
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,828
|
s632508416
|
p00013
|
u214781794
|
1479314290
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7588
| 210
|
import sys
def main():
stack = []
for x in sys.stdin:
x = int(x)
if x:
stack.append(x)
else:
print(stack.pop())
if __name__ == '__main__':
main()
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,829
|
s896902403
|
p00013
|
u079141094
|
1467377515
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7952
| 257
|
# Switching Railroad Cars
from collections import deque
num = int(input())
stk = deque()
while 1:
if num == 0:
print(stk.pop())
else:
stk.append(num)
try: num = int(input())
except EOFError: break
while stk: print(stk.pop())
|
p00013
|
<H1>Switching Railroad Cars</H1>
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_switchingRailroadCars">
</center>
<br>
<p>
This figure shows railway tracks for reshuffling cars. The rail tracks end in the bottom and the top-left rail track is used for the entrace and the top-right rail track is used for the exit. Ten cars, which have numbers from 1 to 10 respectively, use the rail tracks.
</p>
<p>
We can simulate the movement (comings and goings) of the cars as follow:
</p>
<ul>
<li>An entry of a car is represented by its number.</li>
<li>An exit of a car is represented by 0</li>
</ul>
<p>
For example, a sequence
</p>
<pre>
1
6
0
8
10
</pre>
<p>
demonstrates that car 1 and car 6 enter to the rail tracks in this order, car 6 exits from the rail tracks, and then car 8 and car 10 enter.
</p>
<p>
Write a program which simulates comings and goings of the cars which are represented by the sequence of car numbers. The program should read the sequence of car numbers and 0, and print numbers of cars which exit from the rail tracks in order. At the first, there are no cars on the rail tracks. You can assume that 0 will not be given when there is no car on the rail tracks.
</p>
<H2>Input</H2>
<pre>
car number
car number or 0
car number or 0
.
.
.
car number or 0
</pre>
<p>
The number of input lines is less than or equal to 100.
</p>
<H2>Output</H2>
<p>
For each 0, print the car number.
</p>
<H2>Sample Input</H2>
<pre>
1
6
0
8
10
0
0
0
</pre>
<H2>Output for the Sample Input</H2>
<pre>
6
10
8
1
</pre>
|
1
6
0
8
10
0
0
0
|
6
10
8
1
| 5,830
|
s125911650
|
p00014
|
u506537276
|
1558932036
|
Python
|
Python3
|
py
|
Accepted
| 20
|
5592
| 158
|
while True:
try:
d = int(input())
except EOFError:
break
sum = 0
for i in range(600 // d):
j = i * d
sum += j * j * d
print(sum)
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,831
|
s451909678
|
p00014
|
u560838141
|
1408858238
|
Python
|
Python
|
py
|
Accepted
| 10
|
4200
| 155
|
def f(x):
return x ** 2
while True:
try:
d = input()
except:
break;
ans = 0
for i in range(600 / d):
ans += f(i * d) * d
print ans
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,832
|
s183914460
|
p00014
|
u733620181
|
1409853376
|
Python
|
Python
|
py
|
Accepted
| 20
|
4188
| 112
|
import sys
for d in map(int, sys.stdin):
sum = 0
for x in range(d, 600, d):
sum += (x**2)*d
print sum
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,833
|
s763016566
|
p00014
|
u579833671
|
1410768103
|
Python
|
Python
|
py
|
Accepted
| 10
|
4200
| 201
|
while(True):
try:
d = input()
step = 600 / d
ans = 0
for i in range(step):
ans += d * (i * d) ** 2
print(ans)
except Exception:
break
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,834
|
s035790246
|
p00014
|
u506132575
|
1416117633
|
Python
|
Python
|
py
|
Accepted
| 20
|
4184
| 196
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
max_num = 600
def f(x):
return x*x
for s in sys.stdin:
d = int(s)
s = 0
for i in xrange(0,max_num,d):
s += f(i)*d
print s
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,835
|
s185949390
|
p00014
|
u342537066
|
1420711578
|
Python
|
Python3
|
py
|
Accepted
| 30
|
6724
| 161
|
while True:
try:
d=int(input())
sum=0
for i in range(d,600,d):
sum+=i**2*d
print(sum)
except:
break
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,836
|
s107691703
|
p00014
|
u567380442
|
1422616969
|
Python
|
Python3
|
py
|
Accepted
| 30
|
6724
| 103
|
import sys
for line in sys.stdin:
d = int(line)
print(sum(i * i * d for i in range(d, 600, d)))
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,837
|
s353425067
|
p00014
|
u124909914
|
1422951229
|
Python
|
Python
|
py
|
Accepted
| 20
|
4196
| 173
|
while True:
try:
sum = 0
d = input()
for i in range(d, 600, d):
sum += d * i * i
print sum
except EOFError:
break
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,838
|
s048433539
|
p00014
|
u844945939
|
1423743738
|
Python
|
Python3
|
py
|
Accepted
| 30
|
6720
| 133
|
while True:
try:
d = int(input())
except EOFError:
break
print(sum(x ** 2 for x in range(0, 600, d)) * d)
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,839
|
s125273727
|
p00014
|
u744114948
|
1425519077
|
Python
|
Python3
|
py
|
Accepted
| 30
|
6720
| 242
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright : @Huki_Hara
# Created : 2015-03-01
while True:
try:
d=int(input())
except:
break
s=0
for i in range(0,600-d+1,d):
s+=d*i**2
print(s)
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,840
|
s629471139
|
p00014
|
u540744789
|
1425706784
|
Python
|
Python
|
py
|
Accepted
| 10
|
4192
| 126
|
import sys
for d in sys.stdin:
d=int(d)
n=600/d
S=0
for i in xrange(1,n):
S+=(d*i)*(d*i)*d
print S
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,841
|
s542994775
|
p00014
|
u162387221
|
1431320729
|
Python
|
Python
|
py
|
Accepted
| 20
|
4196
| 153
|
while True:
try:
d = int(raw_input())
except EOFError:
break
S = 0
for i in range(d, 600, d):
S += d*i*i
print S
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,842
|
s634185386
|
p00014
|
u067299340
|
1432900633
|
Python
|
Python
|
py
|
Accepted
| 20
|
4220
| 87
|
import sys
for l in sys.stdin:
d=int(l)
print sum([i*i*d**3 for i in range(1,600/d)])
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,843
|
s554341515
|
p00014
|
u067299340
|
1432900639
|
Python
|
Python
|
py
|
Accepted
| 10
|
4216
| 87
|
import sys
for l in sys.stdin:
d=int(l)
print sum([i*i*d**3 for i in range(1,600/d)])
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,844
|
s080646567
|
p00014
|
u067299340
|
1432901205
|
Python
|
Python
|
py
|
Accepted
| 20
|
4216
| 81
|
import sys
for d in map(int,sys.stdin):print sum([i*i*d for i in range(d,600,d)])
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,845
|
s949730167
|
p00014
|
u067299340
|
1432901211
|
Python
|
Python
|
py
|
Accepted
| 20
|
4212
| 81
|
import sys
for d in map(int,sys.stdin):print sum([i*i*d for i in range(d,600,d)])
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,846
|
s632853842
|
p00014
|
u067299340
|
1432901217
|
Python
|
Python
|
py
|
Accepted
| 10
|
4216
| 81
|
import sys
for d in map(int,sys.stdin):print sum([i*i*d for i in range(d,600,d)])
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,847
|
s519638258
|
p00014
|
u873482706
|
1434358005
|
Python
|
Python
|
py
|
Accepted
| 10
|
4208
| 347
|
def get_input():
while True:
try:
yield int(raw_input())
except EOFError:
break
num_lis = list(get_input())
for num in num_lis:
all_count = 600/num
S = 0
for i in range(all_count-1):
count = i+1
yoko = num
tate = (count*num)**2
S += (yoko*tate)
print(S)
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,848
|
s709430782
|
p00014
|
u534550471
|
1434518430
|
Python
|
Python
|
py
|
Accepted
| 20
|
4192
| 223
|
while 1:
try:
dd = raw_input()
d = int(dd)
i = 1
ans = 0
while i * d < 600:
ans += (i * d) * (i * d) * d
i += 1
print ans
except:
break
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,849
|
s024195450
|
p00014
|
u379956761
|
1434766175
|
Python
|
Python3
|
py
|
Accepted
| 30
|
6784
| 236
|
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import sys
import math
def rectArea(h, w):
return h * w
for d in sys.stdin:
area = 0
d = int(d)
for i in range(0, 600, d):
area += rectArea(i*i, d)
print(area)
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,850
|
s103719258
|
p00014
|
u071010747
|
1445233030
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7596
| 331
|
# -*- coding:utf-8 -*-
def main():
while True:
try:
d=int(input())
count=d
ans=0
while count<600:
ans+=(count**2)*d
count+=d
print(ans)
except:
break
if __name__ == '__main__':
main()
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,851
|
s793346634
|
p00014
|
u775586391
|
1448031467
|
Python
|
Python3
|
py
|
Accepted
| 20
|
7652
| 121
|
import sys
for i in sys.stdin.readlines():
s = 0
x = int(i)
for j in range(x,600,x):
s += x * (j**2)
print(s)
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,852
|
s177900785
|
p00014
|
u777299405
|
1450352280
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7656
| 123
|
while True:
try:
d = int(input())
except:
break
print(sum(i * i * d for i in range(d, 600, d)))
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,853
|
s340526088
|
p00014
|
u560214129
|
1450448950
|
Python
|
Python3
|
py
|
Accepted
| 50
|
7640
| 215
|
import sys
def func(x):
fun = x*x
return fun
def cal(d):
s = 0
for i in range(1,int(600/d)):
s = s + d * func(i*d)
return s
for line in sys.stdin.readlines():
d = int(line)
print(cal(d))
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,854
|
s585559597
|
p00014
|
u825618558
|
1451513120
|
Python
|
Python3
|
py
|
Accepted
| 20
|
7644
| 202
|
import sys
def f(x):
return x*x
lines = sys.stdin.readlines()
for line in lines:
d = int(line)
n = 600//d
integ = 0
for i in range(1,n):
integ += d*f(i*d)
print (integ)
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,855
|
s177054203
|
p00014
|
u512342660
|
1455279018
|
Python
|
Python
|
py
|
Accepted
| 10
|
6316
| 135
|
import sys
X = 600
for line in sys.stdin:
s=0
d = int(line)
for nowx in xrange(0,X,d):
s += d*(nowx**2)
print s
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,856
|
s246640490
|
p00014
|
u075836834
|
1458249136
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7564
| 198
|
def function(a):
s=0
d=a
for i in range(d,600-d+1,d):
s+=a*(d**2)
d+=a
#print("%10d %10d"%(d,s))
return s
while True:
try:
n=int(input())
print(function(n))
except EOFError:
break
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,857
|
s419365168
|
p00014
|
u650459696
|
1458448373
|
Python
|
Python3
|
py
|
Accepted
| 20
|
7516
| 116
|
import sys
for i in map(int,sys.stdin):
a = 0
for j in range(0, 600, i):
a += j * j
print(a * i)
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,858
|
s177766958
|
p00014
|
u148101999
|
1458864317
|
Python
|
Python
|
py
|
Accepted
| 10
|
6228
| 215
|
#encoding=utf-8
x = []
ans = 0
while True:
try:
x.append(input())
except:
break
for i in xrange(len(x)):
for j in xrange(x[i],600,x[i]):
ans += j*j*x[i]
print ans
ans = 0
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,859
|
s757455723
|
p00014
|
u130979865
|
1459924330
|
Python
|
Python
|
py
|
Accepted
| 10
|
6228
| 174
|
# -*- coding: utf-8 -*-
import sys
for line in sys.stdin:
d = int(line)
s = 0
x = 0
while x < (600-d):
s += d*(d+x)*(d+x)
x += d
print s
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,860
|
s674305897
|
p00014
|
u572790226
|
1460294189
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7592
| 165
|
import sys
x = 600
lines = sys.stdin.readlines()
for line in lines:
d = int(line)
s = 0
for i in range(x//d):
s += (i * d) ** 2
print(s * d)
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,861
|
s339763394
|
p00014
|
u529386725
|
1461621176
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7584
| 171
|
while True:
try:
d = int(input())
except:
break
ans = 0
x = d
while x < 600:
ans += (x ** 2) * d
x += d
print(ans)
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,862
|
s836882503
|
p00014
|
u894114233
|
1461767978
|
Python
|
Python
|
py
|
Accepted
| 10
|
6400
| 147
|
while 1:
ans=0
try:
d=input()
for i in xrange(600/d-1):
ans+=d*(d*(i+1))**2
print(ans)
except:break
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,863
|
s224520401
|
p00014
|
u957021485
|
1465642345
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7576
| 138
|
import sys
for line in sys.stdin.readlines():
d = int(line)
f = lambda x: x * x
print(sum(d * f(w) for w in range(d, 600, d)))
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,864
|
s696686277
|
p00014
|
u766477342
|
1466209474
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7600
| 218
|
try:
while(1):
d = int(input())
s = 0
for n in [i * d for i in range(1, 600)]:
if n >= 600:
break
s += (n ** 2)
print(s * d)
except:
pass
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,865
|
s339930538
|
p00014
|
u681787924
|
1466432097
|
Python
|
Python3
|
py
|
Accepted
| 20
|
7556
| 304
|
#!/usr/bin/env python
import sys
def function(x):
return x*x
def calculate(d, max):
val = d
result = 0
while val < max:
result += function(val) * d
val += d
return result
if __name__ == '__main__':
for line in sys.stdin:
print(calculate(int(line), 600))
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,866
|
s679661687
|
p00014
|
u203261375
|
1467532896
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7516
| 179
|
while True:
try:
d = int(input())
except:
break
s = 0
x = 0
dx = 600//d
for i in range(dx):
s += x**2*d
x += d
print(s)
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,867
|
s837879746
|
p00014
|
u146816547
|
1469774071
|
Python
|
Python
|
py
|
Accepted
| 10
|
6320
| 165
|
while True:
ans = 0
try:
d = int(raw_input())
for i in range(1, 600/d):
h = d*d*i*i
ans += d*h
print ans
except EOFError:
break
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,868
|
s143201010
|
p00014
|
u582608581
|
1470390312
|
Python
|
Python3
|
py
|
Accepted
| 20
|
7256
| 163
|
while True:
try:
d = eval(input())
integral = 0
for i in range(1, int(600 / d)):
integral += (i * d) ** 2
print(integral * d)
except EOFError:
break
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,869
|
s239536600
|
p00014
|
u358919705
|
1471975350
|
Python
|
Python3
|
py
|
Accepted
| 40
|
7604
| 185
|
while True:
try:
d = int(input())
if not d:
break
except:
break
s = 0
for i in range(d, 600, d):
s += i ** 2 * d
print(s)
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,870
|
s255816319
|
p00014
|
u379499530
|
1472793003
|
Python
|
Python
|
py
|
Accepted
| 10
|
6364
| 146
|
while 1:
try:
d = input()
print sum(map(lambda x: d * ((x * d) ** 2), [i for i in xrange(600 / d)]))
except:
break
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,871
|
s409197938
|
p00014
|
u393305246
|
1474362613
|
Python
|
Python
|
py
|
Accepted
| 10
|
6436
| 179
|
import sys
a = []
for line in sys.stdin:
a.append(line)
for n in a:
num=int(n)
x=0
are=0
while x<600:
are+=(x**2)*num
x+=num
print are
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,872
|
s415174548
|
p00014
|
u659302741
|
1477763601
|
Python
|
Python3
|
py
|
Accepted
| 20
|
7524
| 145
|
import sys
for line in sys.stdin:
d = int(line)
s = 0
for i in range(600 // d - 1):
s += d * (d * (i + 1)) ** 2
print(s)
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,873
|
s876835198
|
p00014
|
u252368621
|
1479004628
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7676
| 171
|
while(True):
try:
d=int(input())
sum=0
for i in range(int(600/d)):
sum+=(((i*d)**2)*d)
print(sum)
except:
break
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,874
|
s403852693
|
p00014
|
u922871577
|
1479281933
|
Python
|
Python
|
py
|
Accepted
| 20
|
6320
| 109
|
import sys
for line in sys.stdin:
d = int(line.rstrip())
print sum(d*D*D for D in xrange(d, 600, d))
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,875
|
s357797313
|
p00014
|
u175111751
|
1479395606
|
Python
|
Python3
|
py
|
Accepted
| 20
|
7632
| 147
|
while True:
s = 0
try:
d = int(input())
except:
break
for i in range(d, 600, d):
s += i**2 * d
print(s)
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,876
|
s934769150
|
p00014
|
u660912567
|
1479890955
|
Python
|
Python3
|
py
|
Accepted
| 20
|
7636
| 148
|
import sys
x = 600
sum = 0
for line in sys.stdin:
d = int(line)
sum = 0
for i in range(1,x//d):
sum += (i*d)**2*d
print(sum)
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,877
|
s832086047
|
p00014
|
u186082958
|
1480450535
|
Python
|
Python3
|
py
|
Accepted
| 20
|
7632
| 129
|
import sys
for i in map(int,sys.stdin):
sum=0
for j in range(600//i-1):
sum+=i*((j+1)*i)*((j+1)*i)
print(sum)
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,878
|
s632612930
|
p00014
|
u301729341
|
1481015079
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7556
| 262
|
def fun(x):
K = x**2
return(K)
Sta = 0
End = 600
while True:
try:
h = int(input())
n = int(600/h)
Sun = 0
for i in range(1,n):
Sun += fun(h*i) * h
print (Sun)
except EOFError:
break
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,879
|
s301904893
|
p00014
|
u123687446
|
1481110267
|
Python
|
Python3
|
py
|
Accepted
| 20
|
7516
| 160
|
while True:
try:
d = int(input())
except EOFError:
break
S = 0
for i in range(1, 600//d):
S += (i*d)**2 * d
print(S)
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,880
|
s641178863
|
p00014
|
u919202930
|
1481591066
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7580
| 191
|
def f(x):
return x*x
ds=[]
while True:
try:
ds.append(int(input()))
except EOFError:
break
for d in ds:
area=0
for s in range(0,int(600/d)):
area+=f(s*d)*d
print(area)
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,881
|
s201013895
|
p00014
|
u811733736
|
1481596107
|
Python
|
Python3
|
py
|
Accepted
| 20
|
7492
| 446
|
import sys
if __name__ == '__main__':
x_limit = 600
# ??????????????\?????¨???????????????
for line in sys.stdin:
d = int(line.strip()) # ????????¢??????????±????
areas = [] # ????????????????????¢???
for i in range(0, x_limit, d): # x=600?????§??????d????????????????????????
areas.append(d * i**2) # ???????????¢???????¨????
print(sum(areas)) # ??¢??????????¨??????¨???
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,882
|
s803634866
|
p00014
|
u546285759
|
1481701475
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7556
| 183
|
while True:
try:
x = int(input())
ans = 0
for i in range(x,600,x):
y = i**2
ans += y*x
print(ans)
except:
break
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,883
|
s623031022
|
p00014
|
u661290476
|
1482208198
|
Python
|
Python3
|
py
|
Accepted
| 20
|
7548
| 162
|
while True:
try:
d=int(input())
SUM=0
for i in range(600//d):
SUM+=(i*d)**2
print(SUM*d)
except:
break
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,884
|
s357210884
|
p00014
|
u957840591
|
1482722896
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7664
| 138
|
import sys
D=[]
for line in sys.stdin:
D.append(int(line))
for d in D:
print(sum([(((i+1)*d)**2)*d for i in range(int(600/d)-1)]))
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,885
|
s226904737
|
p00014
|
u711765449
|
1483963424
|
Python
|
Python3
|
py
|
Accepted
| 20
|
7604
| 308
|
# -*- coding:utf-8 -*-
import sys
def func(x):
return x**2
def rec(x,d):
return d*func(x)
array = []
for i in sys.stdin:
array.append(int(i))
for i in range(len(array)):
d = array[i]
k = int(600/d)
result = 0
for j in range(k):
result += rec(j*d,d)
print(result)
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,886
|
s973348027
|
p00014
|
u078042885
|
1484747730
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7648
| 100
|
while 1:
try:d=int(input())
except:break
print(sum([(i*d)**2*d for i in range(600//d)]))
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,887
|
s319483942
|
p00014
|
u252414452
|
1486040376
|
Python
|
Python
|
py
|
Accepted
| 10
|
6332
| 159
|
import sys
while True:
d = sys.stdin.readline()
if not d: break
d = int(d)
x = d
sum = 0
while x < 600:
sum += x * x * d
x+=d
print(sum)
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,888
|
s522806639
|
p00014
|
u032662562
|
1486534885
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7656
| 266
|
def integral(d):
n = 600//d
s = 0.0
for i in range(n):
s += (d*i)**2
return(s*d)
if __name__ == '__main__':
while True:
try:
d = int(input())
print(int(integral(d)))
except:
break
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,889
|
s779305034
|
p00014
|
u901080241
|
1488959463
|
Python
|
Python3
|
py
|
Accepted
| 20
|
7536
| 133
|
import sys
for line in sys.stdin:
d = int(line)
ans = 0;
for i in range(d,600,d):
ans += i * i * d
print(ans)
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,890
|
s728466952
|
p00014
|
u810591206
|
1489041207
|
Python
|
Python3
|
py
|
Accepted
| 20
|
7468
| 230
|
import sys
def f(x):
return x ** 2
def integral(d):
s = 0
for i in range(600 // d - 1):
s += f(d * (i + 1)) * d
return s
lines = sys.stdin.readlines()
for line in lines:
print(integral(int(line)))
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,891
|
s645956519
|
p00014
|
u318658123
|
1489492520
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7540
| 353
|
import sys
def integral(n):
sumnum = 0
for i in range(1,601 - n):
if i % n == 0:
sumnum += i * i * n
return sumnum
if __name__ == '__main__':
nums = []
for n in sys.stdin:
if n == "\n":
break
else :
nums.append(int(n))
for n in nums:
print(integral(n))
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,892
|
s454336523
|
p00014
|
u797673668
|
1490623357
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7652
| 126
|
while True:
try:
d = int(input())
except:
break
print(sum(d * cd ** 2 for cd in range(d, 600, d)))
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,893
|
s399168345
|
p00014
|
u797673668
|
1490623477
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7596
| 96
|
import sys
for d in map(int, sys.stdin):
print(sum(d * cd ** 2 for cd in range(d, 600, d)))
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,894
|
s740161602
|
p00014
|
u728901930
|
1490783290
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7644
| 189
|
import sys
import math as mas
for t in sys.stdin:
i=int(t)
sum=0
for j in range(0,600,i):sum+=i*j*j
print(sum)
#for i in sys.stdin:
# a,b=map(int,i.split())
# print(gcd(a,b),lcm(a,b))
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,895
|
s812490103
|
p00014
|
u462831976
|
1492708397
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7608
| 243
|
# -*- coding: utf-8 -*-
import sys
import os
import math
def f(x):
return x * x
for s in sys.stdin:
d = int(s)
num = 600 // d
S = 0
for i in range(num):
x = d
y = f(d * i)
S += x * y
print(S)
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,896
|
s190629157
|
p00014
|
u618637847
|
1494898977
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7528
| 178
|
while True:
total = 0
try:
num = int(input())
for i in range(num, 600, num):
total += i*i * num
print(total)
except:
break
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,897
|
s428398985
|
p00014
|
u362104929
|
1495990407
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7516
| 204
|
while True:
try:
num = int(input())
m = int(600 / num)
ans = 0
for i in range(1,m):
ans += num * ((num * i)**2)
print(ans)
except:
break
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,898
|
s198917692
|
p00014
|
u905313459
|
1496402681
|
Python
|
Python3
|
py
|
Accepted
| 30
|
7544
| 126
|
import sys
for line in sys.stdin:
n, d = 0, int(line)
for i in range(d, 600, d):
n += d * i ** 2
print(n)
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,899
|
s799053039
|
p00014
|
u519227872
|
1497011550
|
Python
|
Python
|
py
|
Accepted
| 10
|
6352
| 125
|
while True:
try:
d = float(input())
print int(d * sum([(d*i)**2 for i in range(1,int(600/d))]))
except:
break
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,900
|
s733353726
|
p00014
|
u354053070
|
1501928965
|
Python
|
Python3
|
py
|
Accepted
| 20
|
7568
| 132
|
import sys
for line in sys.stdin:
d = int(line)
S = 0
for x in range(0, 600, d):
S += (x ** 2) * d
print(S)
|
p00014
|
<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>Integral</H1>
<p>
Write a program which computes the area of a shape represented by the following three lines:<br/>
<br/>
$y = x^2$<br/>
$y = 0$<br/>
$x = 600$<br/>
<br/>
<!--<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF1"></center>-->
</p>
<p>
It is clear that the area is $72000000$, if you use an integral you learn in high school. On the other hand, we can obtain an approximative area of the shape by adding up areas of many rectangles in the shape as shown in the following figure:
</p>
<center><img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integral"><br/>
$f(x) = x^2$<br/>
<br/>
</center>
<!--
<center>
<img src="https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_integralF2">
</center>
-->
<p>
The approximative area $s$ where the width of the rectangles is $d$ is:<br/>
<br/>
area of rectangle where its width is $d$ and height is $f(d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(2d)$ $+$ <br/>
area of rectangle where its width is $d$ and height is $f(3d)$ $+$ <br/>
...<br/>
area of rectangle where its width is $d$ and height is $f(600 - d)$ <br/>
</p>
<p>
The more we decrease $d$, the higer-precision value which is close to $72000000$ we could obtain. Your program should read the integer $d$ which is a divisor of $600$, and print the area $s$.
</p>
<H2>Input</H2>
<p>
The input consists of several datasets. Each dataset consists of an integer $d$ in a line. The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
For each dataset, print the area $s$ in a line.
</p>
<H2>Sample Input</H2>
<pre>
20
10
</pre>
<H2>Output for the Sample Input</H2>
<pre>
68440000
70210000
</pre>
|
20
10
|
68440000
70210000
| 5,901
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.