結果

問題 No.373 かけ算と割った余り
ユーザー tanson
提出日時 2025-09-25 00:01:29
言語 Standard ML
(MLton 20210117)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 361 bytes
コンパイル時間 3,101 ms
コンパイル使用メモリ 689,784 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-09-25 00:01:34
合計ジャッジ時間 4,096 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

fun readLargeInt () =
    valOf (TextIO.scanStream (LargeInt.scan StringCvt.DEC) TextIO.stdIn)


val () =
    let
        val a = readLargeInt ()
        val b = readLargeInt ()
        val c = readLargeInt ()
        val d = readLargeInt ()

        val ans = (a mod d) * (b mod d) * (c mod d) mod d
    in
        print (LargeInt.toString ans ^ "\n")
    end
0