Hackpads are smart collaborative documents.
Join Hackpad Now
.
hackpad
h
hackpad
hackpad
more
+ new workspace
Sign In
hide
feedback
invitees only
everyone (public)
zerojudge
2765 days ago
a016: 數獨(SUDOKU)
Unfiled
.
Edited by
百千.IO
2765 days ago
https://zerojudge.tw/ShowProblem?problemid=a016
def there_is_repeat_in_(a_list):
return True if len(set(a_list)) < 9 else False
while True:
try:
matrix_9x9 = [ input().split() for _ in range(9) ]
for row in matrix_9x9:
if there_is_repeat_in_(row):
print('no')
break
Show full change
Show only preview
2777 days ago
a248: 新手訓練 ~ 陣列應用
Unfiled
.
Edited by
百千.IO
2777 days ago
https://zerojudge.tw/ShowProblem?problemid=a248
while True:
try:
a,b,N=input().split()
a,b,N=int(a),int(b),int(N)
answer=str(10**N*a//b)
n=len(answer)
if N>=n:
print('0.'+'0'*(N-n)+answer[-N:])
else:
Show full change
Show only preview
2810 days ago
d732: 二分搜尋法
Unfiled
.
Edited by
百千.IO
2810 days ago
http://zerojudge.tw/ShowProblem?problemid=d732
A串用index方法搜尋最多2*len(B)次 => TLE
當每個b都是A[-1]
input()
A = input().split()
B = input().split()
for b in B:
if b in A:
print(A.index(b)+1)
else:
Show full change
Show only preview
2877 days ago
b966: 第 3 題 線段覆蓋長度
Unfiled
.
Edited by
百千.IO
2877 days ago
https://zerojudge.tw/ShowProblem?problemid=b966
while True:
try:
n=int(input())
lines=[]
for _ in range(n):
lines.append([int(x) for x in input().split()])
lines.sort()
length=0
Show full change
Show only preview
2881 days ago
d351: 10878 - Decode the tape
Unfiled
.
Edited by
百千.IO
2881 days ago
http://zerojudge.tw/ShowProblem?problemid=d351
Show full change
Show only preview
2881 days ago
d097: 10038 - Jolly Jumpers
Unfiled
.
Edited by
陳靖
2881 days ago
http://zerojudge.tw/ShowProblem?problemid=d097
while True:
try:
sequence=[int(i) for i in input().split()]
n=sequence[0]
d=list(range(1,n))
for i in range(1,n):
try:
d.remove(abs(sequence[i]-sequence[i+1]))
except:
Show full change
Show only preview
2881 days ago
a863: 3. Happy Numbers
Unfiled
.
Edited by
嚼嚼
2881 days ago
http://zerojudge.tw/ShowProblem?problemid=a863
def is_happy(n):
if n==1:
return True
if count>100:
return False
global count
count+=1
N=0
for i in str(n):
Show full change
Show only preview
Show more
Stop sharing the collection with
?
This pad is open to "
", so
will still be able to access it.
Cancel
Stop Sharing
Follow
Unfollow
Followed by
Feed
List of Hackpads
a007: 判斷質數
a009: 解碼器
a010: 因數分解
a015: 矩陣的翻轉
a016: 數獨(SUDOKU)
a121: 質數又來囉
a241: 第二題:1 / x 是有限小數
a248: 新手訓練 ~ 陣列應用
a267: 太空梭的油箱
a583: 1. 座位距離計算問題
a586: 4. 捷運計價問題
a863: 3. Happy Numbers
b523: 先別管這個了,你聽過安麗嗎?
b942: 轟轟島
b964: 第 1 題 成績指標
b965: 第 2 題 矩陣轉換
b966: 第 3 題 線段覆蓋長度
d097: 10038 - Jolly Jumpers
d351: 10878 - Decode the tape
d732: 二分搜尋法
Logout
txt
Contact Support
Please select a topic
General usage / How does this work?
Feature request
Login / account issue
Broken / can't load hackpad
Mobile / iOS issue
Other issue
Send your love! ♥
Please check out our
How-to Guide
and
FAQ
first to see if your question is already answered! :)
If you have a feature request, please add it to
this pad
. Thanks!
Send
Log in / Sign up
Sign in with
Google
Sign in with
Facebook
or
Go
Forgot password?
Start using Hackpad
You'll need to turn on JavaScript to use Hackpad in all of its awesomeness. ^_^