結果

問題 No.1177 余りは?
ユーザー WSKRWSKR
提出日時 2020-09-22 21:52:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 280 ms / 1,000 ms
コード長 246 bytes
コンパイル時間 88 ms
コンパイル使用メモリ 10,524 KB
実行使用メモリ 9,648 KB
最終ジャッジ日時 2023-09-09 04:23:10
合計ジャッジ時間 5,146 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
8,776 KB
testcase_01 AC 280 ms
9,648 KB
testcase_02 AC 55 ms
8,716 KB
testcase_03 AC 168 ms
9,196 KB
testcase_04 AC 75 ms
8,728 KB
testcase_05 AC 97 ms
8,744 KB
testcase_06 AC 26 ms
8,316 KB
testcase_07 AC 25 ms
8,340 KB
testcase_08 AC 222 ms
9,288 KB
testcase_09 AC 187 ms
9,464 KB
testcase_10 AC 16 ms
7,792 KB
testcase_11 AC 110 ms
8,856 KB
testcase_12 AC 22 ms
8,212 KB
testcase_13 AC 33 ms
8,288 KB
testcase_14 AC 43 ms
8,496 KB
testcase_15 AC 66 ms
8,720 KB
testcase_16 AC 49 ms
8,496 KB
testcase_17 AC 230 ms
9,536 KB
testcase_18 AC 85 ms
8,828 KB
testcase_19 AC 139 ms
8,980 KB
testcase_20 AC 34 ms
8,416 KB
testcase_21 AC 114 ms
8,896 KB
testcase_22 AC 206 ms
9,388 KB
testcase_23 AC 89 ms
8,768 KB
testcase_24 AC 51 ms
8,620 KB
testcase_25 AC 169 ms
9,112 KB
testcase_26 AC 215 ms
9,336 KB
testcase_27 AC 33 ms
8,408 KB
testcase_28 AC 110 ms
8,848 KB
testcase_29 AC 96 ms
8,884 KB
testcase_30 AC 93 ms
8,940 KB
testcase_31 AC 139 ms
9,076 KB
testcase_32 AC 15 ms
7,784 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 10** 9 + 7

def main():

    p, k = map(int, input().split())
    if k == 0:
        ans = 1+(10**(p-1))//p
        print(ans%mod)
    else:
        ans = (10**(p-1)-k-1)//p+1
        print(ans%mod)


if __name__ == "__main__":
    main()

0