結果
| 問題 |
No.8008 某マヨネーズの網目柄
|
| ユーザー |
HiroakiSoftware
|
| 提出日時 | 2015-02-01 01:17:22 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 242 bytes |
| コンパイル時間 | 187 ms |
| コンパイル使用メモリ | 22,272 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-23 04:43:25 |
| 合計ジャッジ時間 | 909 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:15: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf ( "%d %d" , &x , &y );
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int gcd ( int m , int n );
int main ( void ) {
int x , y;
scanf ( "%d %d" , &x , &y );
printf ( "%d\n" , gcd ( x , y ) );
return 0;
}
int gcd ( int m , int n ) {
if ( n == 0 ) return m;
return gcd ( n , m % n );
}
HiroakiSoftware