結果
| 問題 | 
                            No.280 歯車の問題(1)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             yusaka
                         | 
                    
| 提出日時 | 2015-09-22 15:46:35 | 
| 言語 | Scheme  (Gauche-0.9.15)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 343 bytes | 
| コンパイル時間 | 40 ms | 
| コンパイル使用メモリ | 6,684 KB | 
| 実行使用メモリ | 16,768 KB | 
| 最終ジャッジ日時 | 2024-07-19 08:38:18 | 
| 合計ジャッジ時間 | 2,983 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | WA * 31 | 
ソースコード
#!/usr/bin/env gosh
(read-line)
(let ((gears (read (open-input-string (string-append "(" (read-line) ")")))))
  (define (iter lst acc)
    (if (null? lst)
        acc
        (iter (cdr lst) (/ (car lst) acc))))
  (define r (iter (cdr gears) (car gears)))
  (if (integer? r)
      (display (format "~D/~D" r 1))
      (display r))
  (newline))
            
            
            
        
            
yusaka