結果

問題 No.3021 データベースの練習
ユーザー nanaenanae
提出日時 2017-04-12 16:45:17
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 443 ms / 5,000 ms
コード長 360 bytes
コンパイル時間 229 ms
コンパイル使用メモリ 10,516 KB
実行使用メモリ 24,180 KB
平均クエリ数 540.42
最終ジャッジ日時 2023-09-23 13:11:33
合計ジャッジ時間 4,481 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
24,180 KB
testcase_01 AC 229 ms
24,060 KB
testcase_02 AC 314 ms
24,084 KB
testcase_03 AC 313 ms
23,772 KB
testcase_04 AC 297 ms
23,916 KB
testcase_05 AC 304 ms
23,628 KB
testcase_06 AC 139 ms
23,420 KB
testcase_07 AC 218 ms
23,620 KB
testcase_08 AC 300 ms
23,636 KB
testcase_09 AC 245 ms
23,844 KB
testcase_10 AC 214 ms
23,952 KB
testcase_11 AC 443 ms
24,180 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

def solve():
    q = int(sys.stdin.readline())

    for i in range(q):
        x1, x2, y1, y2 = map(int, sys.stdin.readline().split())

        query = 'SELECT count(*) FROM point WHERE '
        query += '{} <= x AND x <= {} AND {} <= y AND y <= {};'.format(x1, x2, y1, y2)

        print(query, flush=True)

if __name__ == '__main__':
    solve()
0