結果
| 問題 |
No.5009 Draw A Convex Polygon
|
| コンテスト | |
| ユーザー |
yuusanlondon
|
| 提出日時 | 2022-11-09 05:03:23 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 352 bytes |
| コンパイル時間 | 493 ms |
| 実行使用メモリ | 14,552 KB |
| スコア | 0 |
| 最終ジャッジ日時 | 2022-12-01 23:30:35 |
| 合計ジャッジ時間 | 6,918 ms |
|
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 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=0
curry=0
print(10**6)
print(currx,curry)
for i in range(10**6-1):
currx+=a[i][0]
curry+=a[i][1]
print(currx,curry)
yuusanlondon