結果
問題 | No.51 やる気の問題 |
ユーザー | tsuchinaga |
提出日時 | 2019-02-27 10:21:19 |
言語 | Go (1.23.4) |
結果 |
AC
|
実行時間 | 6 ms / 5,000 ms |
コード長 | 221 bytes |
コンパイル時間 | 14,697 ms |
コンパイル使用メモリ | 224,196 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-23 05:02:15 |
合計ジャッジ時間 | 12,968 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
package main import ( "fmt" "math" ) func main() { var w, d int _, _ = fmt.Scan(&w, &d) total := 0 for i := 0; i < d-1; i++ { total += (w - total) / int(math.Pow(float64(d-i), 2)) } fmt.Println(w - total) }