제출 #473661

#제출 시각아이디문제언어결과실행 시간메모리
473661CaroLindaEuklid (COCI20_euklid)C++14
110 / 110
1 ms292 KiB
#include <bits/stdc++.h> using namespace std ; long long g , h ; int main() { int T; scanf("%d", &T ) ; while(T--) { scanf("%lld %lld", &g, &h ) ; long long G = g , H = h ; while(H <= G ) H = H*h ; long long p = H%G ; p = G-p ; H += p ; printf("%lld %lld\n", H*h + G , H ) ; } }

컴파일 시 표준 에러 (stderr) 메시지

euklid.cpp: In function 'int main()':
euklid.cpp:10:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |  scanf("%d", &T ) ;
      |  ~~~~~^~~~~~~~~~~
euklid.cpp:13:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   13 |   scanf("%lld %lld", &g, &h ) ;
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...