結果
| 問題 |
No.5 数字のブロック
|
| コンテスト | |
| ユーザー |
paranormal22
|
| 提出日時 | 2025-10-31 21:24:10 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 403 bytes |
| コンパイル時間 | 1,943 ms |
| コンパイル使用メモリ | 194,740 KB |
| 実行使用メモリ | 7,840 KB |
| 最終ジャッジ日時 | 2025-10-31 21:24:14 |
| 合計ジャッジ時間 | 4,232 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 WA * 27 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main()
{
int l, n, w, sum = 0;
cin >> l >> n;
for(int i = 0; i < n; i++)
{
cin >> w;
sum += w;
}
int ans = 0, p = l;
while(sum > 0)
{
l--;
sum--;
if(l == 0)
{
l = p;
ans++;
}
}
if(l != p && l > 0) ans++;
cout << ans << endl;
}
paranormal22