結果

問題 No.3389 k-Days Later
コンテスト
ユーザー timi
提出日時 2025-11-28 21:31:54
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 426 bytes
コンパイル時間 361 ms
コンパイル使用メモリ 82,900 KB
実行使用メモリ 97,392 KB
最終ジャッジ日時 2025-11-28 21:32:31
合計ジャッジ時間 20,960 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 22 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#N,M,L=map(int, input().split())
N=int(input())
D=list(map(int, input().split()))
#B=list(map(int, input().split()))
#C=list(map(int, input().split()))

A=[0]
for d in D:
  A.append(A[-1]+d)
  
su=A[-1]
Q=int(input())
import bisect
for i in range(Q):
  y,m,d,k=map(int, input().split())
  s=(y-1)*su+A[m-1]+d+k
  B=[]
  B.append(s//su+1)
  s%=su 
  d=bisect.bisect_left(A,s)
  B.append(d)
  s-=A[d-1]
  B.append(s)
  print(*B)
0