結果
| 問題 | No.280 歯車の問題(1) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-03-19 21:41:48 |
| 言語 | Python3 (3.15.2 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 30 ms / 1,000 ms |
| + 31µs | |
| コード長 | 275 bytes |
| 記録 | |
| コンパイル時間 | 420 ms |
| コンパイル使用メモリ | 14,720 KB |
| 実行使用メモリ | 11,648 KB |
| 最終ジャッジ日時 | 2026-10-31 09:12:08 |
| 合計ジャッジ時間 | 4,397 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge7_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 33 |
ソースコード
from fractions import Fraction N = int(input()) Z = [int(s) for s in input().split()] gr = Fraction(1,1) theta = [Fraction(1,1)] for i in range(N-1): theta.append(theta[i]*Fraction(Z[i], Z[i+1])) gr *= theta[i]/theta[i+1]; print(str(gr.numerator)+'/'+str(gr.denominator))