Submission #15228

#TimeUsernameProblemLanguageResultExecution timeMemory
15228hodduc님 무기가 좀 나쁘시네여 (kriii3_S)C++98
29 / 29
0 ms1084 KiB
#include<stdio.h> long long min(long long a,long long b){ return a < b ? a : b; } long long get_power(long long attack, long long str, long long crit, long long critdmg, long long speed) { return attack * (100 + str) * (10000 - min(crit*100, 10000) + (min(crit, 100) * critdmg)) * (100 + speed); } int main() { long long ka, kb, kc, kd, ke; long long pa, pb, pc, pd, pe; long long ia, ib, ic, id, ie; long long ja, jb, jc, jd, je; scanf("%lld %lld %lld %lld %lld", &ka, &kb, &kc, &kd, &ke); scanf("%lld %lld %lld %lld %lld", &pa, &pb, &pc, &pd, &pe); scanf("%lld %lld %lld %lld %lld", &ia, &ib, &ic, &id, &ie); scanf("%lld %lld %lld %lld %lld", &ja, &jb, &jc, &jd, &je); long long k1, k2; k1 = get_power(ka,kb,kc,kd,ke); k2 = get_power(ka-ia+ja,kb-ib+jb,kc-ic+jc,kd-id+jd,ke-ie+je); long long p1, p2; p1 = get_power(pa,pb,pc,pd,pe); p2 = get_power(pa+ia-ja,pb+ib-jb,pc+ic-jc,pd+id-jd,pe+ie-je); //printf("%lld\n%lld\n%lld\n%lld\n", k1, k2, p1, p2); if(k1 > k2) printf("-"); else if(k1 < k2) printf("+"); else printf("0"); printf("\n"); if(p1 > p2) printf("-"); else if(p1 < p2) printf("+"); else printf("0"); printf("\n"); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...