結果
問題 |
No.442 和と積
|
ユーザー |
![]() |
提出日時 | 2017-03-05 04:58:08 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 13 ms / 1,000 ms |
コード長 | 311 bytes |
コンパイル時間 | 199 ms |
コンパイル使用メモリ | 7,328 KB |
実行使用メモリ | 6,400 KB |
最終ジャッジ日時 | 2024-07-04 23:05:08 |
合計ジャッジ時間 | 1,204 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
import math L = raw_input().split() A = int(L[0]) B = int(L[1]) S = A + B P = A * B def greatest_common_dicisor(x,y): if x < y: temp = x x = y y = temp r = x % y while r > 0: x = y y = r r = x % y return y print greatest_common_dicisor(S,P)