結果

問題 No.167 N^M mod 10
ユーザー RinRin
提出日時 2015-09-12 10:37:18
言語 Scheme
(Gauche-0.9.14)
結果
RE  
実行時間 -
コード長 333 bytes
コンパイル時間 69 ms
コンパイル使用メモリ 4,888 KB
実行使用メモリ 13,184 KB
最終ジャッジ日時 2023-09-26 11:37:09
合計ジャッジ時間 5,099 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
11,736 KB
testcase_01 AC 20 ms
11,680 KB
testcase_02 RE -
testcase_03 RE -
testcase_04 AC 22 ms
12,532 KB
testcase_05 AC 31 ms
11,768 KB
testcase_06 AC 19 ms
11,676 KB
testcase_07 AC 19 ms
11,676 KB
testcase_08 AC 19 ms
11,776 KB
testcase_09 AC 19 ms
11,936 KB
testcase_10 AC 19 ms
11,676 KB
testcase_11 AC 19 ms
11,748 KB
testcase_12 AC 19 ms
11,748 KB
testcase_13 AC 19 ms
11,652 KB
testcase_14 AC 20 ms
11,680 KB
testcase_15 AC 19 ms
11,680 KB
testcase_16 AC 19 ms
11,852 KB
testcase_17 AC 20 ms
11,776 KB
testcase_18 TLE -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (System.out.println x)
  (begin
    (display x)
    (newline)
  )
)

(let (
      (N (modulo (read) 10))
      (M (read))
     )
  (let (
        (foo (modulo M 12))
       )
    (if (and (= foo 0) (< foo M))
        (System.out.println (modulo (expt N 12) 10))
        (System.out.println (modulo (expt N M) 10))
    )
  )
)
0