結果

問題 No.722 100×100=1000
ユーザー ikd
提出日時 2019-08-01 19:22:02
言語 Scheme
(Gauche-0.9.15)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 400 bytes
コンパイル時間 200 ms
コンパイル使用メモリ 6,816 KB
実行使用メモリ 17,152 KB
最終ジャッジ日時 2024-12-29 19:47:02
合計ジャッジ時間 2,529 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#! /usr/bin/env gosh
(define (count-nz n)
  (if (= n 0)
    0
    (+ (if (= (modulo n 10) 0) 
         0 
         1)
       (count-nz (quotient n 10)))))

(define (hand n)
  (and (= (mod n 100) 0)
       (= (count-nz n) 1)))

(let* ([a (read)] [b (read)] [p (* a b)])
  (if (and (hand a) (hand b))
    (display (quotient p 10))
    (if (< (abs p) 100000000)
      (display p)
      (display "E"))))
0