Multiply Valid Integers (Mod)

Python Medium 4 views
Back to Questions

Problem Description

Read n tokens. Multiply only valid integers and take modulo 1000000007. If no valid integers, output 0.

Input Format

First line n. Second line n tokens.

Output Format

One integer result.

Sample Test Case

Input:
6 2 x 3 4y 5 -1
Output:
999999977

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next