結果
問題 | No.816 Beautiful tuples |
ユーザー |
![]() |
提出日時 | 2019-04-19 21:25:59 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 266 bytes |
コンパイル時間 | 320 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 17,696 KB |
最終ジャッジ日時 | 2024-09-22 16:23:23 |
合計ジャッジ時間 | 3,323 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 TLE * 1 -- * 12 |
ソースコード
# -*- coding: utf-8 -*- a,b = map(int,input().split()) ans = 0 for c in range(1,a+b+1): if a != b and b != c and c != a: if (b + c) % a == 0 and (a + c) % b == 0 and (b + a) % c == 0: ans = c break else: ans = -1 print(ans)