fork download
  1. #include <stdio.h>
  2. int main() {
  3. int T;
  4. scanf("%d", &T);
  5. for (int i = 0; i < T; i++) {
  6. long long N;
  7. scanf("%lld", &N);
  8. int sediatempe = ((N - 1) % 3 == 0);
  9. int sediapisgor = ((N - 1) % 5 == 0);
  10. if (sediatempe && sediapisgor) {
  11. printf("TEMPE DAN PISGOR\n");
  12. } else if (sediatempe) {
  13. printf("TEMPE\n");
  14. } else if (sediapisgor) {
  15. printf("PISGOR\n");
  16. } else {
  17. printf("KOSONG\n");
  18. }
  19. }
  20. return 0;
  21. }
Success #stdin #stdout 0s 5320KB
stdin
2
1 11
stdout
TEMPE DAN PISGOR
PISGOR