結果
問題 | No.442 和と積 |
ユーザー |
![]() |
提出日時 | 2017-01-31 00:06:34 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 359 bytes |
コンパイル時間 | 1,433 ms |
コンパイル使用メモリ | 153,564 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-12 06:45:21 |
合計ジャッジ時間 | 2,121 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
import std.stdio;import std.algorithm;import std.range;import std.bigint;void main(string[] args){auto input = readln.splitter.map!(BigInt).array;auto a = input[0] + input[1], b = input[0] * input[1];if (a < b) {swap(a, b);}while (b) {immutable t = a % b;a = b;b = t;}writeln(a);}