結果

問題 No.442 和と積
ユーザー apahie
提出日時 2019-04-09 20:30:01
言語 Nim
(2.2.0)
結果
RE  
実行時間 -
コード長 292 bytes
コンパイル時間 3,215 ms
コンパイル使用メモリ 66,532 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-01 23:03:44
合計ジャッジ時間 4,258 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 RE * 1
other AC * 5 RE * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

import seqUtils, strutils

proc gcd(a, b:int64): int64 =
  var
    big = max(a, b)
    small = min(a, b)
  while small > 0:
    (big, small) = (small, big mod small)
  return big

let
  tmp: seq[int64] = stdin.readLine.split.map parseBiggestInt
  (a, b) = (tmp[0], tmp[1])

echo gcd(a+b, a*b)
0