Skip to content

Instantly share code, notes, and snippets.

@doloopwhile
Last active June 27, 2017 20:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doloopwhile/db199980669c17e39472 to your computer and use it in GitHub Desktop.
Save doloopwhile/db199980669c17e39472 to your computer and use it in GitHub Desktop.
Paiza
import sys
numbers = []
for line in sys.stdin:
numbers.append([int(s) for s in line.split()])
L, _, _ = numbers[0]
connections = {}
for x, y, y2 in numbers[1:]:
connections[(x, y)] = (x + 1, y2)
connections[(x + 1, y2)] = (x, y)
x = 1
y = L
while y > 0:
x, y = connections.get((x, y), (x, y))
y -= 1
print(x)
# coding: utf-8
import sys
def main():
pocket_count, index = map(int, sys.stdin.readline().split())
q = pocket_count * 2
page = (index - 1) // q
print(((2 * page + 1) * q + 1) - index)
if __name__ == '__main__':
main()
@paiza-team
Copy link

paiza回答コード掲載停止のお願い

いつもご利用ありがとうございます。
paiza運営事務局です。

こちらのgistを拝見しまして、paizaの掲載中の問題について記載されてらっしゃったため、ご連絡させていただきました。

paizaにおいては、利用規約第8条(禁止事項)10項で、問題に関する内容、解答、ヒントを含め、
他サイトでの掲載を禁止させていただいております。

利用規約第8条10項(禁止事項)
http://paiza.jp/guide/kiyaku

===
10.ブログ・SNS等本サイト以外の媒体(インターネット媒体に限られず、不特定多数が閲覧可能なものを全て含む。)上において、
当社が出題した問題の内容、当該問題に対する解答、解答へのヒント等の示唆及びカンニング等の不正を助長する内容等を掲載する行為.。
===

現在ご掲載中のコードついて、早急に削除または非掲載対応をお願いできますでしょうか。

大変お手数ですが、よろしくお願い致します。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment