結果

問題 No.167 N^M mod 10
ユーザー Rin
提出日時 2015-08-25 23:16:33
言語 Scheme
(Gauche-0.9.15)
結果
TLE  
実行時間 -
コード長 298 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 6,812 KB
実行使用メモリ 22,944 KB
最終ジャッジ日時 2024-07-18 14:33:18
合計ジャッジ時間 2,432 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 2
other AC * 1 TLE * 1 -- * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

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

(define (^ x y)
  (let loop((i 0) (foo 1))
    (if (= i y)
        foo
        (loop (+ i 1) (modulo (* foo x) 10))
    )
  )
)

(let (
      (N (modulo (read) 10))
      (M (read))
     )
  (System.out.println (^ N M))
)
0