Skip to content

Instantly share code, notes, and snippets.

@kira924age
Last active December 27, 2015 00:08
Show Gist options
  • Save kira924age/7235074 to your computer and use it in GitHub Desktop.
Save kira924age/7235074 to your computer and use it in GitHub Desktop.
標準入出力の場合
#include <stdio.h>
int main()
{
int L, a, b, c, d;
int M, N;
scanf("%d\n%d\n%d\n%d\n%d\n",&L, &a, &b, &c, &d);
M = a/c;
N = b/d;
if(a % c != 0)
M++;
if(b % d != 0)
N++;
if(M > N)
printf("%d\n", L - M);
else
printf("%d\n", L - N);
return 0;
}
@kira924age
Copy link
Author

ちょっと修正しました。

@kira924age
Copy link
Author

セミコロン忘れてた

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment