結果
問題 | No.2776 Bigger image |
ユーザー |
👑 ![]() |
提出日時 | 2024-05-27 20:53:14 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 38 ms / 2,000 ms |
コード長 | 491 bytes |
コンパイル時間 | 106 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,264 KB |
最終ジャッジ日時 | 2024-12-24 17:47:28 |
合計ジャッジ時間 | 2,026 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 25 |
ソースコード
import sys from fractions import Fraction input = sys.stdin.readline def read_values(): return tuple(map(int, input().split())) def read_list(): return list(read_values()) def main(): a,b=read_values() h,w=read_values() non = Fraction(min(a*w,b*h),max(a*w,b*h)) rot = Fraction(min(b*w,a*h),max(b*w,a*h)) if non == rot: print('Same') elif non < rot: print('Rotating') else: print('Non-rotating') if __name__ == "__main__": main()