結果

問題 No.750 Frac #1
ユーザー ldsyb
提出日時 2019-09-19 03:34:18
言語 Scheme
(Gauche-0.9.15)
結果
WA  
実行時間 -
コード長 267 bytes
コンパイル時間 62 ms
コンパイル使用メモリ 6,816 KB
実行使用メモリ 16,128 KB
最終ジャッジ日時 2024-07-18 06:36:38
合計ジャッジ時間 2,122 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 22 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

(define n (read))
(define a '())
(let loop((i 0))
	(if (= i n)
		'()
		(begin
			(let ((p (read)) (q (read)))
				(set! a (cons (/ p q) a))
			)
			(loop (+ i 1))
		)
	)
)
(set! a (reverse (sort a)))
(for-each (lambda (x) (print (numerator x) " " (denominator x))) a)
0