結果

問題 No.442 和と積
コンテスト
ユーザー apahie
提出日時 2019-04-09 20:24:36
言語 Nim
(2.2.8)
コンパイル:
nim --nimcache=~ --hints:off -o:a.out -d:release cpp _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 288 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 4,267 ms
コンパイル使用メモリ 69,888 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2026-03-23 02:26:16
合計ジャッジ時間 5,239 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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)
0