Download spoj_cpp_clean/ACPC10A/ACPC10A-13.cpp from slayone/uva_spoj_raw: direct link, hf CLI and curl.
- Browser
- Download file 1.24 kB
-
https://huggingface.co/datasets/slayone/uva_spoj_raw/resolve/main/spoj_cpp_clean/ACPC10A/ACPC10A-13.cpp
- Command line
-
hf download hf://datasets/slayone/uva_spoj_raw/spoj_cpp_clean/ACPC10A/ACPC10A-13.cpp
-
curl -L -o ACPC10A-13.cpp https://huggingface.co/datasets/slayone/uva_spoj_raw/resolve/main/spoj_cpp_clean/ACPC10A/ACPC10A-13.cpp
1.24 kB
| typedef long long i64; | |
| template <class T> void make_unique(T& v) {sort(all(v)); v.resize(unique(all(v)) - v.begin());} | |
| using namespace std; | |
| int main(){ | |
| freopen("data.in","r",stdin); | |
| int a, b, c; | |
| while(scanf("%d %d %d", &a, &b, &c)==3 &&(a||b||c)){ | |
| int rate = b - a; | |
| if(b + rate == c){ | |
| printf("AP %d\n", c+rate); | |
| }else{ | |
| rate = b/a; | |
| printf("GP %d\n",c*rate); | |
| } | |
| } | |
| return 0; | |
| } |