結果
| 問題 | 
                            No.8100 始業式
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2023-03-31 23:23:31 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 308 bytes | 
| コンパイル時間 | 1,842 ms | 
| コンパイル使用メモリ | 193,936 KB | 
| 最終ジャッジ日時 | 2025-02-11 21:53:38 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | WA * 1 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for (int i=0;i<(int)(n);i++)
int main(){
  int t;
  cin>>t;
  rep(Ti,t){
    int n;
    cin>>n;
    vector<int> f(n);
    rep(i,n) cin>>f.at(i);
    int ct=n;
    rep(i,n) if(f.at(i)) ct--;
    cout<<(ct+1)%n<<endl;
  }
}