結果
| 問題 | No.3682 きあいのハチマキ |
| コンテスト | |
| ユーザー |
2251799813685248
|
| 提出日時 | 2026-09-09 02:24:04 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 141 ms / 2,000 ms |
| + 201µs | |
| コード長 | 622 bytes |
| 記録 | |
| コンパイル時間 | 68 ms |
| コンパイル使用メモリ | 81,408 KB |
| 実行使用メモリ | 84,520 KB |
| 最終ジャッジ日時 | 2026-09-09 02:24:21 |
| 合計ジャッジ時間 | 1,866 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 2 |
ソースコード
def solve(): H1, A1, S1, H2, A2, S2 = map(int, input().split()) t = min((H1-1)//A2, (H2-1)//A1) H1 -= A2*t H2 -= A1*t if H1 <= A2: n = (H2-1)//A1 temp = 0 if S1 > S2: temp = 10*pow(11, -1, 998244353) elif S1 < S2: temp = pow(11, -1, 998244353) else: temp = 499122177 print(temp*pow(10, -n, 998244353)%998244353) elif H2 <= A1: n = (H1-1)//A2 temp = 0 if S1 < S2: temp = 10*pow(11, -1, 998244353) elif S1 > S2: temp = pow(11, -1, 998244353) else: temp = 499122177 print((1-temp*pow(10, -n, 998244353))%998244353) else: print(0) for i in range(int(input())): solve()
2251799813685248