結果
| 問題 |
No.2700 Please Hack Greedy Solution!
|
| コンテスト | |
| ユーザー |
detteiuu
|
| 提出日時 | 2024-08-11 03:37:01 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 47 ms / 500 ms |
| コード長 | 326 bytes |
| コンパイル時間 | 444 ms |
| コンパイル使用メモリ | 82,820 KB |
| 実行使用メモリ | 65,592 KB |
| 最終ジャッジ日時 | 2025-01-06 11:39:13 |
| 合計ジャッジ時間 | 731 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
ソースコード
N = 1000
W = 1000
ans = []
ans.append((10**6, 1))
for i in reversed(range(2, W+1)):
if i == W:
ans.append((10**6*i-1, i))
else:
right = (10**6-ans[-1][0]/ans[-1][1])/(i-1)
x = ans[-1][0]/ans[-1][1]-right
x = int(x)
ans.append(((x*i, i)))
print(N, W)
for a in ans:
print(*a)
detteiuu