提出 #37165856


ソースコード 拡げる

N, T = map(int, input().split())
A = [int(i) for i in input().split()]

#プレイリストが1週する時間を求めておく
cycle_duration = 0
for d in A:
    cycle_duration = cycle_duration + d

q, r = T // cycle_duration, T % cycle_duration

pos = 1
for d in A:
    if r-d < 0:
        print(str(pos) + " " + str(r))
        break
    r = r-d
    pos = pos + 1

提出情報

提出日時
問題 C - Circular Playlist
ユーザ zendza
言語 Python (3.8.2)
得点 300
コード長 383 Byte
結果 AC
実行時間 75 ms
メモリ 19940 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 300 / 300
結果
AC × 3
AC × 27
セット名 テストケース
Sample 00_example_00.txt, 00_example_01.txt, 00_example_02.txt
All 00_example_00.txt, 00_example_01.txt, 00_example_02.txt, 01_max_00.txt, 01_max_01.txt, 02_min_00.txt, 02_min_01.txt, 03_small_00.txt, 03_small_01.txt, 03_small_02.txt, 03_small_03.txt, 03_small_04.txt, 03_small_05.txt, 03_small_06.txt, 03_small_07.txt, 03_small_08.txt, 03_small_09.txt, 04_random_00.txt, 04_random_01.txt, 04_random_02.txt, 04_random_03.txt, 04_random_04.txt, 04_random_05.txt, 04_random_06.txt, 04_random_07.txt, 04_random_08.txt, 04_random_09.txt
ケース名 結果 実行時間 メモリ
00_example_00.txt AC 22 ms 9032 KiB
00_example_01.txt AC 20 ms 8848 KiB
00_example_02.txt AC 20 ms 9160 KiB
01_max_00.txt AC 75 ms 19940 KiB
01_max_01.txt AC 63 ms 10756 KiB
02_min_00.txt AC 17 ms 9024 KiB
02_min_01.txt AC 18 ms 8856 KiB
03_small_00.txt AC 50 ms 13216 KiB
03_small_01.txt AC 27 ms 11216 KiB
03_small_02.txt AC 37 ms 11796 KiB
03_small_03.txt AC 46 ms 13484 KiB
03_small_04.txt AC 18 ms 8996 KiB
03_small_05.txt AC 18 ms 9144 KiB
03_small_06.txt AC 56 ms 16208 KiB
03_small_07.txt AC 50 ms 13244 KiB
03_small_08.txt AC 53 ms 14412 KiB
03_small_09.txt AC 39 ms 13252 KiB
04_random_00.txt AC 45 ms 13464 KiB
04_random_01.txt AC 58 ms 18864 KiB
04_random_02.txt AC 57 ms 17476 KiB
04_random_03.txt AC 47 ms 15972 KiB
04_random_04.txt AC 38 ms 12020 KiB
04_random_05.txt AC 42 ms 12904 KiB
04_random_06.txt AC 31 ms 11288 KiB
04_random_07.txt AC 42 ms 13408 KiB
04_random_08.txt AC 57 ms 19124 KiB
04_random_09.txt AC 52 ms 16568 KiB