結果
問題 |
No.933 おまわりさんこいつです
|
ユーザー |
![]() |
提出日時 | 2019-12-24 00:10:50 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 38 ms / 2,000 ms |
コード長 | 371 bytes |
コンパイル時間 | 924 ms |
コンパイル使用メモリ | 106,104 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-22 03:59:21 |
合計ジャッジ時間 | 1,731 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math, std.typecons, std.numeric; void main() { auto N = readln.strip.to!int; auto ps = readln.split.to!(long[]); long x = 1, t; foreach (p; ps) { if (p == 0) { writeln(0); return; } x = (x * p) % 9; } writeln(x == 0 ? 9 : x); }