結果
| 問題 |
No.933 おまわりさんこいつです
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-11-29 22:15:32 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 271 bytes |
| コンパイル時間 | 314 ms |
| コンパイル使用メモリ | 27,392 KB |
| 最終ジャッジ日時 | 2025-01-08 06:02:58 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 WA * 17 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:15: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | int N; scanf("%d", &N);
| ~~~~~^~~~~~~~~~
main.cpp:10:18: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
10 | i64 pi; scanf("%ld", &pi);
| ~~~~~^~~~~~~~~~~~
ソースコード
#include <cstdint>
#include <cstdio>
using namespace std;
using i64 = int64_t;
int main(void) {
int N; scanf("%d", &N);
i64 res = 1;
for(int i=0; i<N; ++i) {
i64 pi; scanf("%ld", &pi);
res *= pi % 9;
res %= 9;
}
printf("%ld\n", res);
return 0;
}