結果

問題 No.3389 k-Days Later
コンテスト
ユーザー moon17
提出日時 2025-11-28 21:53:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 384 ms / 2,000 ms
コード長 224 bytes
コンパイル時間 702 ms
コンパイル使用メモリ 82,100 KB
実行使用メモリ 98,924 KB
最終ジャッジ日時 2025-11-28 21:54:13
合計ジャッジ時間 16,776 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from bisect import*
(n,),ds,(q,),*e=[[*map(int,s.split())] for s in open(0)]
s=[0]
for i in ds:
  s+=s[-1]+i,
for y,m,d,k in e:
  t=y*s[-1]+s[m-1]+d+k-1
  y=t//s[-1]
  t%=s[-1]
  m=bisect(s,t)-1
  d=t-s[m]
  print(y,m+1,d+1)
0