結果

問題 No.167 N^M mod 10
ユーザー Rin
提出日時 2015-09-12 10:37:18
言語 Scheme
(Gauche-0.9.15)
結果
RE  
実行時間 -
コード長 333 bytes
コンパイル時間 183 ms
コンパイル使用メモリ 5,632 KB
実行使用メモリ 17,408 KB
最終ジャッジ日時 2024-07-19 06:15:38
合計ジャッジ時間 4,592 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))
     )
  (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