Last active
December 27, 2015 00:08
-
-
Save kira924age/7235074 to your computer and use it in GitHub Desktop.
標準入出力の場合
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ちょっと修正しました。