#include<bits/stdc++.h> using namespace std; int a[14]; int main() { int i, j = 1,n; for(i = 1; i <= 13; i ++) { n = 1; do { if(j > 13) j = 1; if(a[j]) j++; else { if(n == i) a[j] = i; j ++; n ++; } }while (n <= i); } for (i = 1; i <= 13; i ++) cout << a[i] << endl; }
标签:std,13,int,++,5.26,main From: https://www.cnblogs.com/dmx-03/p/17436022.html