Submission #58774

#TimeUsernameProblemLanguageResultExecution timeMemory
58774pos13050방 배정하기 (KOI17_room)C++98
100 / 100
24 ms816 KiB
#include <stdio.h> #include <stdlib.h> int main() { int a,b,c,n,i,j,k; scanf("%d %d %d %d",&a,&b,&c,&n); for(i=0;i<=n;i++) { for(j=0;j<=n;j++) { for(k=0;k<=n;k++) { if(i*a+j*b+k*c==n) { printf("1"); return 0; } } } } printf("0"); return 0; }

Compilation message (stderr)

room.cpp: In function 'int main()':
room.cpp:7:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d %d %d %d",&a,&b,&c,&n);
     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...