結果
| 問題 | No.280 歯車の問題(1) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-03-19 21:41:48 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 23 ms / 1,000 ms |
| + 885µs | |
| コード長 | 275 bytes |
| 記録 | |
| コンパイル時間 | 55 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 11,136 KB |
| 最終ジャッジ日時 | 2026-09-07 09:51:24 |
| 合計ジャッジ時間 | 4,432 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
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))