結果
| 問題 |
No.5009 Draw A Convex Polygon
|
| コンテスト | |
| ユーザー |
yuusanlondon
|
| 提出日時 | 2022-11-09 04:58:06 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 416 bytes |
| コンパイル時間 | 867 ms |
| 実行使用メモリ | 297,976 KB |
| スコア | 0 |
| 平均クエリ数 | 2.00 |
| 最終ジャッジ日時 | 2022-12-01 23:30:12 |
| 合計ジャッジ時間 | 5,828 ms |
|
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 1 |
ソースコード
from math import gcd
from functools import cmp_to_key
a=[]
for i in range(1,1300):
for j in range(1,1300):
if gcd(i,j)==1:
a.append((i,j))
def get_frac(tuple1):
return tuple1[1]/tuple1[0]
a.sort(key=get_frac)
currx=-10**9
curry=-10**9
ans=[currx,curry]
for i in range(10**6-1):
currx+=a[i][0]
curry+=a[i][1]
ans.append(currx)
ans.append(curry)
print(len(ans)//2)
print(' '.join(map(str,ans)))
yuusanlondon