結果
問題 | No.415 ぴょん |
ユーザー |
![]() |
提出日時 | 2016-08-26 22:25:09 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 200 bytes |
コンパイル時間 | 107 ms |
コンパイル使用メモリ | 22,400 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-18 14:30:56 |
合計ジャッジ時間 | 808 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 27 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:10:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%d%d", &n, &d); | ~~~~~^~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>int gcd(int x, int y) {if(y == 0) { return x; }return gcd(y, x % y);}int main() {int n, d;scanf("%d%d", &n, &d);printf("%d\n", n / gcd(n, d) - 1 );return 0;}