結果

問題 No.1041 直線大学
ユーザー splash9494splash9494
提出日時 2020-05-02 00:51:59
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 287 bytes
コンパイル時間 368 ms
コンパイル使用メモリ 86,736 KB
実行使用メモリ 71,428 KB
最終ジャッジ日時 2023-08-26 18:46:57
合計ジャッジ時間 4,548 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,104 KB
testcase_01 AC 69 ms
71,380 KB
testcase_02 AC 67 ms
71,056 KB
testcase_03 AC 74 ms
71,196 KB
testcase_04 AC 65 ms
71,264 KB
testcase_05 AC 64 ms
71,040 KB
testcase_06 AC 62 ms
71,212 KB
testcase_07 AC 61 ms
71,236 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 63 ms
71,100 KB
testcase_11 AC 62 ms
71,344 KB
testcase_12 AC 65 ms
71,268 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 62 ms
71,252 KB
testcase_21 WA -
testcase_22 AC 63 ms
71,064 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 59 ms
71,240 KB
testcase_29 AC 59 ms
71,328 KB
testcase_30 AC 62 ms
71,172 KB
testcase_31 AC 62 ms
71,344 KB
testcase_32 AC 62 ms
71,020 KB
testcase_33 AC 63 ms
71,180 KB
testcase_34 AC 64 ms
71,180 KB
testcase_35 AC 63 ms
71,204 KB
testcase_36 AC 65 ms
71,204 KB
testcase_37 AC 64 ms
71,420 KB
testcase_38 AC 63 ms
71,236 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

input = sys.stdin.buffer.readline

N = int(input())

ps = []
for _ in range(N):
    ps.append(tuple(map(int, input().split())))

cnt = 2

for p in ps[2:]:
    if (ps[1][1] - ps[0][1])*(ps[1][0] - p[0]) == (ps[1][1] - p[1])*(ps[1][0] - ps[0][0]) :
        cnt += 1
print(cnt)
0