AOJ 1009 - Greatest Common Divisor
英語が読めるようになりたいです.
#include <iostream> int main(){ int a, b; while(std::cin >> a >> b, !std::cin.eof()){ while(b){ int c = b; b = a % b, a = c; } std::cout << a << std::endl; } }
英語が読めるようになりたいです.
#include <iostream> int main(){ int a, b; while(std::cin >> a >> b, !std::cin.eof()){ while(b){ int c = b; b = a % b, a = c; } std::cout << a << std::endl; } }