Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
7.37
daniil-vlasenko
Jul 16th, 2019
84
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
text
0.21 KB
| None
|
0
0
raw
download
clone
embed
print
report
n = int(input())
x = int(input())
b1 = x
b2 = x
for i in range(n-1):
x = int(input())
if b1 < b2:
if x < b1:
b1 = x
else:
if x > b2:
b2 = x
if b1 > b2:
print(b2,b1)
else:
print(b1,b2)
Add Comment
Please,
Sign In
to add comment
Public Pastes
Untitled
FreeBasic | 2 min ago | 1.05 KB
🤑 G2A.com Free Gift Card Guide Apr 2024 FIX 🤑
GetText | 51 min ago | 0.39 KB
🤑 G2A.com Free Gift Card Guide Apr 2024 FIX 🤑
GetText | 57 min ago | 0.38 KB
BWR - Changelog 19/04/24
Diff | 1 hour ago | 2.58 KB
СПРИНТ № 7 | Модель памяти в C++ | Урок 8: Ко...
C++ | 1 hour ago | 7.16 KB
2024-04-19_stats.json
JSON | 1 hour ago | 4.99 KB
2024-04-19_stats.json
JSON | 2 hours ago | 4.98 KB
2024-04-19_stats.json
JSON | 2 hours ago | 4.96 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!