結果
問題 | No.756 チャンパーノウン定数 (1) |
ユーザー |
|
提出日時 | 2018-12-06 12:11:07 |
言語 | Haskell (9.10.1) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 454 bytes |
コンパイル時間 | 2,069 ms |
コンパイル使用メモリ | 174,208 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-14 02:24:45 |
合計ジャッジ時間 | 3,166 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) Main.hs:6:1: warning: [GHC-94817] [-Wtabs] Tab character found here, and in 16 further locations. Suggested fix: Please use spaces instead. | 6 | mod num bse | ^^^^^^^^ [2 of 2] Linking a.out
ソースコード
#!/usr/bin/env runghcimportControl.ApplicativeimportSystem.IOisEOFcalc2 0 num bse =mod num bsecalc2 d num bse =calc2 (d-1) (div num bse) bsecalc digits expbase bse x n =if x>n thencalc2 (digits-1-(mod n digits)) (expbase+(div n digits)) bseelsecalc (digits+1) (expbase*bse) bse ((digits+1)*(expbase*bse)*(bse-1)) (n-x)main = doeof <- isEOFif not eof then don<-readLnprint $ calc 1 1 10 9 (n-1)mainelse return ()