TEST - Life, the Universe, and Everything

Your program is to use the brute-force approach in order to find the Answer to Life, the Universe, and Everything. More precisely... rewrite small numbers from input to output. Stop processing input after reading in the number 42. All numbers at input are integers of one or two digits.

Example

Input:
1
2
88
42
99

Output:
1
2
88

Information

In case of any problems with your code, you can take a look in the forum, you'll find the answer, only for this problem, in various languages.


Нэмсэн:mima
Огноо:2004-05-01
Хугацааны хязгаарлалт:10s
Эх кодын хэмжээний хязгаарлалт:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Програмчлалын хэлүүд:Бүгд дараах хэлүүдээс бусад: NCSHARP JULIA PYPY3
Эх сурвалж:Douglas Adams, The Hitchhiker's Guide to the Galaxy

hide comments
2024-03-25 07:10:09
x=int(input())
b=x//1000%10
a=x%10
s=b+a
print(s)
2024-03-25 07:09:23
a=int(input())
s=a//100%10
x=s*s
print(x)
2024-03-25 07:07:54
x=int(input())
b=x//10%10
z=b*b
print(z)
2024-03-25 07:06:45
x=int(input())
b=x//10
a=x%10
s=b+a
z=b*a
print(s ,z)
2024-03-25 07:04:26
a,b,c=[int(x) for x in input().split()]
s=(a+b+c)+(a+b+c)
print(s)
2024-03-25 07:02:48
a,b,c,d,e=[int(x) for x in input().split()]
s=a*b*c*d*e
print(s)
2024-03-25 07:01:54
a,b,c=[int(x) for x in input().split()]
x=a+b+c
s=x%3
print(s)
2024-03-25 07:01:06
a,b,c,d=[int(x) for x in input().split()]
s=a+b+c+d
z=a-b-c-d
q=a*b*c*d
print(s,z,q)
2024-03-25 06:58:59
a,b=[int(x) for x in input().split()]
s=a*b
print(s)
2024-03-25 06:57:32
x=int(input())
a=(x*x)*6
b=x*x*x
print(a,b)
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.