conversations
listlengths
2
2
Question Name
stringclasses
49 values
Question Description
stringclasses
49 values
Input Requirements
stringclasses
49 values
Output Requirements
stringclasses
49 values
Sample Input
stringclasses
49 values
Sample Output
stringclasses
49 values
Difficulty
stringclasses
1 value
Question Source
stringclasses
1 value
Question Source URL
stringclasses
1 value
Answer Source
stringclasses
1 value
Answer Source URL
stringclasses
1 value
Exam name
stringclasses
1 value
Exam Description
stringclasses
1 value
CPE Website
stringclasses
1 value
[ { "content": "11321 Sort! Sort!! And Sort!!! 要怎麼解? ", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\nint N, M;\n \nbool cmp(int x, int y){\n if ((x % M) != (y % M)){\n return (x % M) < (y % M);\n } else {\n if ((x % 2) * (y % 2)){...
11321 Sort! Sort!! And Sort!!!
Hmm! Here you are asked to do a simple sorting. You will be given N numbers and a positive integer M. You will have to sort the N numbers in ascending order of their modulo M value. If there is a tie between an odd number and an even number (that is their modulo M value is the same) then the odd number will precede the...
The input file contains 20 sets of inputs. Each set starts with two integers N (0 < N ≤ 10000) and M (0 < M ≤ 10000) which denotes how many numbers are within this set. Each of the next N lines contains one number each. These numbers should all fit in 32-bit signed integer. Input is terminated by a line containing two ...
For each set of input produce N + 1 lines of outputs. The first line of each set contains the value of N and M. The next N lines contain N numbers, sorted according to the rules mentioned above. Print the last two zeroes of the input file in the output file also.
15 3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0
15 3 15 9 3 6 12 13 7 1 4 10 11 5 2 8 14 0 0
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "11321 Sort! Sort!! And Sort!!! 的解答是什麼?", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\nint N, M;\n \nbool cmp(int x, int y){\n if ((x % M) != (y % M)){\n return (x % M) < (y % M);\n } else {\n if ((x % 2) * (y % 2))...
11321 Sort! Sort!! And Sort!!!
Hmm! Here you are asked to do a simple sorting. You will be given N numbers and a positive integer M. You will have to sort the N numbers in ascending order of their modulo M value. If there is a tie between an odd number and an even number (that is their modulo M value is the same) then the odd number will precede the...
The input file contains 20 sets of inputs. Each set starts with two integers N (0 < N ≤ 10000) and M (0 < M ≤ 10000) which denotes how many numbers are within this set. Each of the next N lines contains one number each. These numbers should all fit in 32-bit signed integer. Input is terminated by a line containing two ...
For each set of input produce N + 1 lines of outputs. The first line of each set contains the value of N and M. The next N lines contain N numbers, sorted according to the rules mentioned above. Print the last two zeroes of the input file in the output file also.
15 3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0
15 3 15 9 3 6 12 13 7 1 4 10 11 5 2 8 14 0 0
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "如何用C++實作 11321 Sort! Sort!! And Sort!!!? ", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\nint N, M;\n \nbool cmp(int x, int y){\n if ((x % M) != (y % M)){\n return (x % M) < (y % M);\n } else {\n if ((x % 2) * (y % ...
11321 Sort! Sort!! And Sort!!!
Hmm! Here you are asked to do a simple sorting. You will be given N numbers and a positive integer M. You will have to sort the N numbers in ascending order of their modulo M value. If there is a tie between an odd number and an even number (that is their modulo M value is the same) then the odd number will precede the...
The input file contains 20 sets of inputs. Each set starts with two integers N (0 < N ≤ 10000) and M (0 < M ≤ 10000) which denotes how many numbers are within this set. Each of the next N lines contains one number each. These numbers should all fit in 32-bit signed integer. Input is terminated by a line containing two ...
For each set of input produce N + 1 lines of outputs. The first line of each set contains the value of N and M. The next N lines contain N numbers, sorted according to the rules mentioned above. Print the last two zeroes of the input file in the output file also.
15 3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0
15 3 15 9 3 6 12 13 7 1 4 10 11 5 2 8 14 0 0
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "給我一個 11321 Sort! Sort!! And Sort!!! 的C++程式碼。 ", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\nint N, M;\n \nbool cmp(int x, int y){\n if ((x % M) != (y % M)){\n return (x % M) < (y % M);\n } else {\n if ((x % 2) * (...
11321 Sort! Sort!! And Sort!!!
Hmm! Here you are asked to do a simple sorting. You will be given N numbers and a positive integer M. You will have to sort the N numbers in ascending order of their modulo M value. If there is a tie between an odd number and an even number (that is their modulo M value is the same) then the odd number will precede the...
The input file contains 20 sets of inputs. Each set starts with two integers N (0 < N ≤ 10000) and M (0 < M ≤ 10000) which denotes how many numbers are within this set. Each of the next N lines contains one number each. These numbers should all fit in 32-bit signed integer. Input is terminated by a line containing two ...
For each set of input produce N + 1 lines of outputs. The first line of each set contains the value of N and M. The next N lines contain N numbers, sorted according to the rules mentioned above. Print the last two zeroes of the input file in the output file also.
15 3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0
15 3 15 9 3 6 12 13 7 1 4 10 11 5 2 8 14 0 0
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "你知道 11321 Sort! Sort!! And Sort!!! 的解法嗎? ", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\nint N, M;\n \nbool cmp(int x, int y){\n if ((x % M) != (y % M)){\n return (x % M) < (y % M);\n } else {\n if ((x % 2) * (y % ...
11321 Sort! Sort!! And Sort!!!
Hmm! Here you are asked to do a simple sorting. You will be given N numbers and a positive integer M. You will have to sort the N numbers in ascending order of their modulo M value. If there is a tie between an odd number and an even number (that is their modulo M value is the same) then the odd number will precede the...
The input file contains 20 sets of inputs. Each set starts with two integers N (0 < N ≤ 10000) and M (0 < M ≤ 10000) which denotes how many numbers are within this set. Each of the next N lines contains one number each. These numbers should all fit in 32-bit signed integer. Input is terminated by a line containing two ...
For each set of input produce N + 1 lines of outputs. The first line of each set contains the value of N and M. The next N lines contain N numbers, sorted according to the rules mentioned above. Print the last two zeroes of the input file in the output file also.
15 3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0
15 3 15 9 3 6 12 13 7 1 4 10 11 5 2 8 14 0 0
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "撰寫 11321 Sort! Sort!! And Sort!!! 的程式碼並附帶說明。 ", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\nint N, M;\n \nbool cmp(int x, int y){\n if ((x % M) != (y % M)){\n return (x % M) < (y % M);\n } else {\n if ((x % 2) * (...
11321 Sort! Sort!! And Sort!!!
Hmm! Here you are asked to do a simple sorting. You will be given N numbers and a positive integer M. You will have to sort the N numbers in ascending order of their modulo M value. If there is a tie between an odd number and an even number (that is their modulo M value is the same) then the odd number will precede the...
The input file contains 20 sets of inputs. Each set starts with two integers N (0 < N ≤ 10000) and M (0 < M ≤ 10000) which denotes how many numbers are within this set. Each of the next N lines contains one number each. These numbers should all fit in 32-bit signed integer. Input is terminated by a line containing two ...
For each set of input produce N + 1 lines of outputs. The first line of each set contains the value of N and M. The next N lines contain N numbers, sorted according to the rules mentioned above. Print the last two zeroes of the input file in the output file also.
15 3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0
15 3 15 9 3 6 12 13 7 1 4 10 11 5 2 8 14 0 0
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "生成 11321 Sort! Sort!! And Sort!!! 的程式碼解答。 ", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\nint N, M;\n \nbool cmp(int x, int y){\n if ((x % M) != (y % M)){\n return (x % M) < (y % M);\n } else {\n if ((x % 2) * (y %...
11321 Sort! Sort!! And Sort!!!
Hmm! Here you are asked to do a simple sorting. You will be given N numbers and a positive integer M. You will have to sort the N numbers in ascending order of their modulo M value. If there is a tie between an odd number and an even number (that is their modulo M value is the same) then the odd number will precede the...
The input file contains 20 sets of inputs. Each set starts with two integers N (0 < N ≤ 10000) and M (0 < M ≤ 10000) which denotes how many numbers are within this set. Each of the next N lines contains one number each. These numbers should all fit in 32-bit signed integer. Input is terminated by a line containing two ...
For each set of input produce N + 1 lines of outputs. The first line of each set contains the value of N and M. The next N lines contain N numbers, sorted according to the rules mentioned above. Print the last two zeroes of the input file in the output file also.
15 3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0
15 3 15 9 3 6 12 13 7 1 4 10 11 5 2 8 14 0 0
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "我需要 11321 Sort! Sort!! And Sort!!! 的C++程式碼,幫我生成一個。 ", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\nint N, M;\n \nbool cmp(int x, int y){\n if ((x % M) != (y % M)){\n return (x % M) < (y % M);\n } else {\n if ((x % ...
11321 Sort! Sort!! And Sort!!!
Hmm! Here you are asked to do a simple sorting. You will be given N numbers and a positive integer M. You will have to sort the N numbers in ascending order of their modulo M value. If there is a tie between an odd number and an even number (that is their modulo M value is the same) then the odd number will precede the...
The input file contains 20 sets of inputs. Each set starts with two integers N (0 < N ≤ 10000) and M (0 < M ≤ 10000) which denotes how many numbers are within this set. Each of the next N lines contains one number each. These numbers should all fit in 32-bit signed integer. Input is terminated by a line containing two ...
For each set of input produce N + 1 lines of outputs. The first line of each set contains the value of N and M. The next N lines contain N numbers, sorted according to the rules mentioned above. Print the last two zeroes of the input file in the output file also.
15 3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0
15 3 15 9 3 6 12 13 7 1 4 10 11 5 2 8 14 0 0
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "How to solve \"11332 Summing Digits\"?", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return solve(ret);\n}\...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "What is the solution for \"11332 Summing Digits\"?", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return sol...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "How to implement \"11332 Summing Digits\" in C++?", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return solv...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "Give me a C++ code for \"11332 Summing Digits\".", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return solve...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "Do you know the solution for \"11332 Summing Digits\".", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "Show me the code for \"11332 Summing Digits\" with explanations.", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n e...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "Generate a code solution for \"11332 Summing Digits\".", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "I need a C++ code for \"11332 Summing Digits\", generate it for me.", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n ...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "How to solve 11332 Summing Digits?", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return solve(ret);\n}\n \...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "What is the solution for 11332 Summing Digits?", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return solve(r...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "How to implement 11332 Summing Digits in C++?", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return solve(re...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "Give me a C++ code for 11332 Summing Digits.", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return solve(ret...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "Do you know the solution for 11332 Summing Digits.", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return sol...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "Show me the code for 11332 Summing Digits with explanations.", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else ...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "Generate a code solution for 11332 Summing Digits.", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return sol...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "I need a C++ code for 11332 Summing Digits, generate it for me.", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n el...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "「11332 Summing Digits」要怎麼解? ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return solve(ret);\n}\n \nint m...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "「11332 Summing Digits」的解答是什麼?", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return solve(ret);\n}\n \nint ...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "如何用C++實作「11332 Summing Digits」? ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return solve(ret);\n}\n \ni...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "給我一個「11332 Summing Digits」的C++程式碼。 ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return solve(ret);\n}\n ...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "你知道「11332 Summing Digits」的解法嗎? ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return solve(ret);\n}\n \nin...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "撰寫「11332 Summing Digits」的程式碼並附帶說明。 ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return solve(ret);\n}\n ...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "生成「11332 Summing Digits」的程式碼解答。 ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return solve(ret);\n}\n \ni...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "我需要「11332 Summing Digits」的C++程式碼,幫我生成一個。 ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return solve(ret);\...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "11332 Summing Digits 要怎麼解? ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return solve(ret);\n}\n \nint ma...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "11332 Summing Digits 的解答是什麼?", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return solve(ret);\n}\n \nint m...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "如何用C++實作 11332 Summing Digits? ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return solve(ret);\n}\n \nin...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "給我一個 11332 Summing Digits 的C++程式碼。 ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return solve(ret);\n}\n ...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "你知道 11332 Summing Digits 的解法嗎? ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return solve(ret);\n}\n \nin...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "撰寫 11332 Summing Digits 的程式碼並附帶說明。 ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return solve(ret);\n}\n ...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "生成 11332 Summing Digits 的程式碼解答。 ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return solve(ret);\n}\n \ni...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "我需要 11332 Summing Digits 的C++程式碼,幫我生成一個。 ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint solve(int x) {\n int ret = 0;\n while (x) {\n ret += x % 10;\n x /= 10;\n }\n if (ret < 10) return ret;\n else return solve(ret);\...
11332 Summing Digits
For a positive integer n, let f(n) denote the sum of the digits of n when represented in base 10. It is easy to see that the sequence of numbers n, f(n), f(f(n)), f(f(f(n)))... eventually becomes a single digit number that repeats forever. Let this single digit be denoted g(n). For example, consider n = 1234567892. Th...
Each line of input contains a single positive integer n at most 2,000,000,000. Input is terminated by n = 0 which should not be processed.
For each such integer, you are to output a single line containing g(n).
2 11 47 1234567892 0
2 2 2 2
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "How to solve \"11349 Symmetric Matrix\"?", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[n][n];\n ...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "What is the solution for \"11349 Symmetric Matrix\"?", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "How to implement \"11349 Symmetric Matrix\" in C++?", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[n...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "Give me a C++ code for \"11349 Symmetric Matrix\".", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[n]...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "Do you know the solution for \"11349 Symmetric Matrix\".", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long lon...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "Show me the code for \"11349 Symmetric Matrix\" with explanations.", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n ...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "Generate a code solution for \"11349 Symmetric Matrix\".", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long lon...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "I need a C++ code for \"11349 Symmetric Matrix\", generate it for me.", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n ...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "How to solve 11349 Symmetric Matrix?", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[n][n];\n ...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "What is the solution for 11349 Symmetric Matrix?", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[n][n...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "How to implement 11349 Symmetric Matrix in C++?", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[n][n]...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "Give me a C++ code for 11349 Symmetric Matrix.", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[n][n];...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "Do you know the solution for 11349 Symmetric Matrix.", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "Show me the code for 11349 Symmetric Matrix with explanations.", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n lo...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "Generate a code solution for 11349 Symmetric Matrix.", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "I need a C++ code for 11349 Symmetric Matrix, generate it for me.", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n ...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "「11349 Symmetric Matrix」要怎麼解? ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[n][n];\n bool f...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "「11349 Symmetric Matrix」的解答是什麼?", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[n][n];\n bool ...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "如何用C++實作「11349 Symmetric Matrix」? ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[n][n];\n bo...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "給我一個「11349 Symmetric Matrix」的C++程式碼。 ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[n][n];\n ...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "你知道「11349 Symmetric Matrix」的解法嗎? ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[n][n];\n boo...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "撰寫「11349 Symmetric Matrix」的程式碼並附帶說明。 ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[n][n];\n ...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "生成「11349 Symmetric Matrix」的程式碼解答。 ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[n][n];\n bo...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "我需要「11349 Symmetric Matrix」的C++程式碼,幫我生成一個。 ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[n][n];\n ...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "11349 Symmetric Matrix 要怎麼解? ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[n][n];\n bool fl...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "11349 Symmetric Matrix 的解答是什麼?", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[n][n];\n bool f...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "如何用C++實作 11349 Symmetric Matrix? ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[n][n];\n boo...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "給我一個 11349 Symmetric Matrix 的C++程式碼。 ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[n][n];\n ...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "你知道 11349 Symmetric Matrix 的解法嗎? ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[n][n];\n boo...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "撰寫 11349 Symmetric Matrix 的程式碼並附帶說明。 ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[n][n];\n ...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "生成 11349 Symmetric Matrix 的程式碼解答。 ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[n][n];\n bo...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "我需要 11349 Symmetric Matrix 的C++程式碼,幫我生成一個。 ", "role": "user" }, { "content": "#include <iostream>\nusing namespace std;\n \nint main() {\n int T, n;\n char ch;\n cin >> T;\n for (int Case = 1; Case <= T; Case++){\n cin >> ch >> ch >> n;\n long long a[n][n];\n ...
11349 Symmetric Matrix
You're given a square matrix M. Elements of this matrix are Mij:{0 < i < n, 0 < j < n}. In this problem you'll have to find out whether the given matrix is symmetric or not. Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. ...
First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n - the dimension of square matrix. Then n lines follow each of them containing row i. Row contains exactly n elements separated by a space character. j-th n...
For each test case output one line 'Test #t: S'. Where t is the test number starting from 1. Line S is equal to 'Symmetric' if matrix is symmetric and 'Non-symmetric' in any other case.
2 N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5
Test #1: Symmetric. Test #2: Non-symmetric.
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "How to solve \"11417 GCD\"?", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin >> N && N) {\n G =...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "What is the solution for \"11417 GCD\"?", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin >> N && N) {\...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "How to implement \"11417 GCD\" in C++?", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin >> N && N) {\n...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "Give me a C++ code for \"11417 GCD\".", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin >> N && N) {\n ...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "Do you know the solution for \"11417 GCD\".", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin >> N && N...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "Show me the code for \"11417 GCD\" with explanations.", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "Generate a code solution for \"11417 GCD\".", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin >> N && N...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "I need a C++ code for \"11417 GCD\", generate it for me.", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "How to solve 11417 GCD?", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin >> N && N) {\n G = 0;\...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "What is the solution for 11417 GCD?", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin >> N && N) {\n ...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "How to implement 11417 GCD in C++?", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin >> N && N) {\n ...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "Give me a C++ code for 11417 GCD.", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin >> N && N) {\n ...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "Do you know the solution for 11417 GCD.", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin >> N && N) {\...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "Show me the code for 11417 GCD with explanations.", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin >> ...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "Generate a code solution for 11417 GCD.", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin >> N && N) {\...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "I need a C++ code for 11417 GCD, generate it for me.", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin ...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "「11417 GCD」要怎麼解? ", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin >> N && N) {\n G = 0;\n ...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "「11417 GCD」的解答是什麼?", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin >> N && N) {\n G = 0;\n ...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "如何用C++實作「11417 GCD」? ", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin >> N && N) {\n G = 0;\n ...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "給我一個「11417 GCD」的C++程式碼。 ", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin >> N && N) {\n G = 0;...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "你知道「11417 GCD」的解法嗎? ", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin >> N && N) {\n G = 0;\n ...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "撰寫「11417 GCD」的程式碼並附帶說明。 ", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin >> N && N) {\n G = 0;...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "生成「11417 GCD」的程式碼解答。 ", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin >> N && N) {\n G = 0;\n ...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "我需要「11417 GCD」的C++程式碼,幫我生成一個。 ", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin >> N && N) {\n ...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "11417 GCD 要怎麼解? ", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin >> N && N) {\n G = 0;\n ...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "11417 GCD 的解答是什麼?", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin >> N && N) {\n G = 0;\n ...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "如何用C++實作 11417 GCD? ", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin >> N && N) {\n G = 0;\n ...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null
[ { "content": "給我一個 11417 GCD 的C++程式碼。 ", "role": "user" }, { "content": "#include <iostream>\n#include <algorithm>\nusing namespace std;\n \nint GCD(int x, int y) {\n while ((x %= y) && (y %= x));\n return x + y;\n}\n \nint main() {\n int N, G;\n while (cin >> N && N) {\n G = 0;...
11417 GCD
Given the value of N, you will have to find the value of G. The definition of G is given below: G = Σ from i=1 to i<N Σ from j=i+1 to j≤N GCD(i,j) Here GCD(i,j) means the greatest common divisor of integer i and integer j. For those who have trouble understanding summation notation, the meaning of G is given in the ...
The input file contains at most 100 lines of inputs. Each line contains an integer N (1 < N < 501). The meaning of N is given in the problem statement. Input is terminated by a line containing a single zero. This zero should not be processed.
For each line of input produce one line of output. This line contains the value of G for corresponding N.
10 100 500 0
67 13015 442011
One star
Online Judge
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=0
Yui Huang's Website
https://yuihuang.com/cpe-level-1/
null
null
null