結果
| 問題 |
No.442 和と積
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-09-11 15:36:09 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 240 bytes |
| コンパイル時間 | 153 ms |
| コンパイル使用メモリ | 28,544 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-23 10:35:18 |
| 合計ジャッジ時間 | 1,039 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 WA * 7 |
ソースコード
#include <stdio.h>
long gcd(long x,long y)
{
long r;
if(y>x){
r=x;
x=y;
y=r;
}
while(y>0){
r=x%y;
x=y;
y=r;
}
return x;
}
int main(void)
{
long a,b;
scanf("%ld%ld",&a,&b);
printf("%ld",gcd(a+b,gcd(a,b)));
return 0;
}