This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
#include <bits/stdc++.h>
using namespace std;
int main() {
//通用mod运算,重复输出指定的1-N的方法,注意(i-1)%20-1的妙处!
for (int i = 1; i < 101; ++i) {
cout << setw(4) << (i - 1) % 20 + 1 << " ";
if (i % 20 == 0)cout << endl;
}
return 0;