結果

問題 No.1177 余りは?
ユーザー yuruhiyayuruhiya
提出日時 2020-08-22 12:01:18
言語 Crystal
(1.11.2)
結果
AC  
実行時間 13 ms / 1,000 ms
コード長 109 bytes
コンパイル時間 17,638 ms
コンパイル使用メモリ 258,888 KB
実行使用メモリ 7,428 KB
最終ジャッジ日時 2023-09-13 11:56:12
合計ジャッジ時間 18,724 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
5,844 KB
testcase_01 AC 13 ms
7,428 KB
testcase_02 AC 5 ms
5,548 KB
testcase_03 AC 10 ms
6,940 KB
testcase_04 AC 6 ms
5,840 KB
testcase_05 AC 7 ms
6,044 KB
testcase_06 AC 4 ms
5,132 KB
testcase_07 AC 3 ms
5,180 KB
testcase_08 AC 12 ms
7,072 KB
testcase_09 AC 10 ms
6,952 KB
testcase_10 AC 3 ms
4,956 KB
testcase_11 AC 8 ms
6,228 KB
testcase_12 AC 3 ms
5,032 KB
testcase_13 AC 4 ms
5,412 KB
testcase_14 AC 4 ms
5,508 KB
testcase_15 AC 5 ms
5,724 KB
testcase_16 AC 5 ms
5,524 KB
testcase_17 AC 11 ms
7,088 KB
testcase_18 AC 7 ms
5,920 KB
testcase_19 AC 8 ms
6,432 KB
testcase_20 AC 4 ms
5,328 KB
testcase_21 AC 8 ms
6,160 KB
testcase_22 AC 10 ms
7,080 KB
testcase_23 AC 7 ms
5,988 KB
testcase_24 AC 5 ms
5,600 KB
testcase_25 AC 10 ms
6,836 KB
testcase_26 AC 10 ms
7,072 KB
testcase_27 AC 4 ms
5,448 KB
testcase_28 AC 8 ms
6,148 KB
testcase_29 AC 7 ms
6,088 KB
testcase_30 AC 6 ms
6,012 KB
testcase_31 AC 8 ms
6,268 KB
testcase_32 AC 3 ms
4,716 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

require "big"
q, k = read_line.split.map &.to_i
puts ((10.to_big_i**(q - 1) - 1 - k) // q + 1) % (10**9 + 7)
0