結果
問題 | No.793 うし数列 2 |
ユーザー | Dakatan |
提出日時 | 2019-06-23 12:46:59 |
言語 | Go (1.22.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 282 bytes |
コンパイル時間 | 11,908 ms |
コンパイル使用メモリ | 214,132 KB |
実行使用メモリ | 9,136 KB |
最終ジャッジ日時 | 2023-08-27 05:07:19 |
合計ジャッジ時間 | 15,833 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,384 KB |
testcase_01 | AC | 1 ms
4,380 KB |
testcase_02 | AC | 1 ms
4,376 KB |
testcase_03 | AC | 2 ms
4,380 KB |
testcase_04 | AC | 1 ms
4,376 KB |
testcase_05 | AC | 3 ms
4,380 KB |
testcase_06 | AC | 7 ms
4,380 KB |
testcase_07 | AC | 4 ms
4,376 KB |
testcase_08 | AC | 8 ms
4,376 KB |
testcase_09 | AC | 6 ms
4,376 KB |
testcase_10 | TLE | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
ソースコード
package main import "fmt" func main() { var n int fmt.Scan(&n) cur1, cur3, sum, mod := 1, 3, 0, 1000000007 for i := 0; i < n; i++ { cur1 = cur1 * 10 % mod if i > 0 { cur3 = cur3 * 10 % mod } sum = (sum + cur3) % mod } sum = (sum + cur1) % mod fmt.Println(sum) }