結果
| 問題 |
No.1034 テスターのふっぴーさん
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-24 21:40:55 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 477 bytes |
| コンパイル時間 | 127 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 17,572 KB |
| 最終ジャッジ日時 | 2024-10-15 02:35:55 |
| 合計ジャッジ時間 | 4,323 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 TLE * 1 -- * 9 |
ソースコード
#!/usr/bin/env python3
def solve(n: int, y: int, x: int) -> int:
acc = 0
while True:
if y == 0:
return acc + x
acc += n - 1
if x == n - 1:
return acc + y
acc += n
y = n - y - 1
x = (n - 1) - x - 1
n -= 1
def main():
q = int(input())
for i in range(q):
n, i, j = map(int, input().split())
t = solve(n, i, j)
print(t)
if __name__ == '__main__':
main()