結果
| 問題 |
No.3079 Unite Japanese Prefectures
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-04-16 15:39:57 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 644 bytes |
| コンパイル時間 | 251 ms |
| コンパイル使用メモリ | 81,792 KB |
| 実行使用メモリ | 58,752 KB |
| 最終ジャッジ日時 | 2025-04-16 15:44:53 |
| 合計ジャッジ時間 | 2,104 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 27 |
ソースコード
import sys
def main():
input = sys.stdin.read().split()
if not input:
return
T = int(input[0])
if T == 0:
return
cases = list(map(int, input[1:T+1]))
max_n = max(cases) if cases else 0
max_n = max(max_n, 1) # Ensure at least 1 to handle cases where all N are 0 (though per problem constraints, N >=1)
divisors = [0] * (max_n + 1)
for i in range(1, max_n + 1):
for j in range(i, max_n + 1, i):
divisors[j] += 1
results = []
for n in cases:
results.append(str(divisors[n] - 1))
print('\n'.join(results))
if __name__ == '__main__':
main()
lam6er