結果
問題 |
No.863 計算量
|
ユーザー |
![]() |
提出日時 | 2025-03-20 18:57:05 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 39 ms / 1,000 ms |
コード長 | 460 bytes |
コンパイル時間 | 157 ms |
コンパイル使用メモリ | 82,448 KB |
実行使用メモリ | 53,616 KB |
最終ジャッジ日時 | 2025-03-20 18:58:24 |
合計ジャッジ時間 | 1,401 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 |
ソースコード
A = int(input()) B = int(input()) # Check for linear time complexity (P*N) linear_low = max(A / 5000, B / 200000) linear_high = min((A + 1) / 5000, (B + 1) / 200000) linear_possible = linear_low < linear_high # Check for quadratic time complexity (Q*N^2) square_low = max(A / (25_000_000), B / (400_000_000_000)) square_high = min((A + 1) / 25_000_000, (B + 1) / 400_000_000_000) square_possible = square_low < square_high print(1 if linear_possible else 2)