結果
問題 |
No.1406 Test
|
ユーザー |
![]() |
提出日時 | 2021-03-01 15:12:15 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 225 bytes |
コンパイル時間 | 1,876 ms |
コンパイル使用メモリ | 190,500 KB |
最終ジャッジ日時 | 2025-01-19 08:56:35 |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:6:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d", &n); | ~~~~~^~~~~~~~~~ main.cpp:9:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | scanf("%d", &a); | ~~~~~^~~~~~~~~~
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ int n, a, s; scanf("%d", &n); s = 0; for(int i=1; i<n; ++i){ scanf("%d", &a); s += a; } s = (n - s % n) % n; printf("%d\n", (100 - s) / n + 1); return 0; }