結果
| 問題 | No.3682 きあいのハチマキ |
| コンテスト | |
| ユーザー |
ゼット
|
| 提出日時 | 2026-09-05 14:06:25 |
| 言語 | PyPy3 (7.3.23) |
| 結果 |
AC
|
| 実行時間 | 162 ms / 2,000 ms |
| + 891µs | |
| コード長 | 373 bytes |
| 記録 | |
| コンパイル時間 | 227 ms |
| コンパイル使用メモリ | 96,336 KB |
| 実行使用メモリ | 85,664 KB |
| 最終ジャッジ日時 | 2026-09-05 14:07:34 |
| 合計ジャッジ時間 | 2,058 ms |
|
ジャッジサーバーID (参考情報) |
judge6_0 / judge5_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 2 |
ソースコード
Q=int(input())
for _ in range(Q):
a,b,c,d,e,f=map(int,input().split())
z0=((a-1)//e)
z1=((d-1)//b)
K=abs(z0-z1)
mod=998244353
t=pow(10,-K,mod)
if z0>z1:
result=1-t
result%=mod
else:
result=0
if c>f:
result+=t*(10*pow(11,-1,mod))
elif c<f:
result+=t*(pow(11,-1,mod))
else:
result+=t*(pow(2,-1,mod))
result%=mod
print(result)
ゼット