結果

問題 No.167 N^M mod 10
ユーザー Rin
提出日時 2015-09-12 10:43:09
言語 Scheme
(Gauche-0.9.15)
結果
RE  
実行時間 -
コード長 395 bytes
コンパイル時間 47 ms
コンパイル使用メモリ 5,120 KB
実行使用メモリ 17,408 KB
最終ジャッジ日時 2024-07-19 06:15:43
合計ジャッジ時間 4,092 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 14 RE * 2 TLE * 1 -- * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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