結果
| 問題 |
No.816 Beautiful tuples
|
| コンテスト | |
| ユーザー |
ory1113
|
| 提出日時 | 2019-04-19 21:41:30 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 226 bytes |
| コンパイル時間 | 256 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 16,128 KB |
| 最終ジャッジ日時 | 2024-09-22 17:47:51 |
| 合計ジャッジ時間 | 3,298 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 1 TLE * 1 -- * 12 |
ソースコード
a,b = map(int,input().split())
x =[]
for i in range(1,a+b):
if i!=a and i!=b:
if (a+b)%i==0:
x.append(i)
for i in x:
if (a+i)%b==0 and (i+b)%a==0:
print(i)
exit()
else:
print(-1)
ory1113